pub trait ChannelCompatRecv: Send {
type Data: AsRef<[u8]>;
// Required methods
fn channel_recv(&mut self) -> Option<Self::Data>;
fn try_channel_recv(&mut self) -> Option<Self::Data>;
// Provided method
fn into_compat(self) -> ChannelCompat<Self> ⓘ
where Self: Sized { ... }
}
Available on crate feature
channel
only.Expand description
A trait that represents a channel that can be read from.
Required Associated Types§
Required Methods§
Sourcefn channel_recv(&mut self) -> Option<Self::Data>
fn channel_recv(&mut self) -> Option<Self::Data>
Receives data from the channel.
Sourcefn try_channel_recv(&mut self) -> Option<Self::Data>
fn try_channel_recv(&mut self) -> Option<Self::Data>
Tries to receive data from the channel.
Provided Methods§
Sourcefn into_compat(self) -> ChannelCompat<Self> ⓘwhere
Self: Sized,
fn into_compat(self) -> ChannelCompat<Self> ⓘwhere
Self: Sized,
Converts the channel to a ChannelCompat
instance.
Implementations on Foreign Types§
Source§impl<D: AsRef<[u8]> + Clone + Send> ChannelCompatRecv for Receiver<D>
Available on crate feature tokio-channel
only.
impl<D: AsRef<[u8]> + Clone + Send> ChannelCompatRecv for Receiver<D>
Available on crate feature
tokio-channel
only.Source§impl<D: AsRef<[u8]> + Send> ChannelCompatRecv for Receiver<D>
Available on crate feature tokio-channel
only.
impl<D: AsRef<[u8]> + Send> ChannelCompatRecv for Receiver<D>
Available on crate feature
tokio-channel
only.Source§impl<D: AsRef<[u8]> + Send> ChannelCompatRecv for Receiver<D>
Available on crate feature crossbeam-channel
only.
impl<D: AsRef<[u8]> + Send> ChannelCompatRecv for Receiver<D>
Available on crate feature
crossbeam-channel
only.Source§impl<D: AsRef<[u8]> + Send> ChannelCompatRecv for UnboundedReceiver<D>
Available on crate feature tokio-channel
only.
impl<D: AsRef<[u8]> + Send> ChannelCompatRecv for UnboundedReceiver<D>
Available on crate feature
tokio-channel
only.