Type Alias seec_channel::BaseReceiver

source ·
pub type BaseReceiver<T> = Receiver<T, Bincode>;

Aliased Type§

struct BaseReceiver<T> { /* private fields */ }

Implementations

§

impl<T, Codec> Receiver<T, Codec>
where T: DeserializeOwned + Send + 'static, Codec: Codec,

pub fn new(receiver: Receiver) -> Receiver<T, Codec>

Creates a base remote receiver from a [chmux] receiver.

pub async fn recv(&mut self) -> Result<Option<T>, RecvError>

Receive an item from the remote endpoint.

pub async fn close(&mut self)

Close the channel.

This stops the remote endpoint from sending more data, but allows already sent data to be received.

Trait Implementations

source§

impl<T, Codec> ReceiverT<T> for Receiver<T, Codec>
where T: RemoteSend, Codec: Codec,

§

type Error = RecvError

source§

fn recv<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<Option<T>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,