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,
impl<T, Codec> Receiver<T, Codec>where
T: DeserializeOwned + Send + 'static,
Codec: Codec,
pub fn new(receiver: Receiver) -> Receiver<T, 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>
pub async fn recv(&mut self) -> Result<Option<T>, RecvError>
Receive an item from the remote endpoint.
pub async fn close(&mut self)
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.