pub trait ChannelCompatSend: Send {
type Data: From<Vec<u8>>;
// Required method
fn channel_send(&mut self, data: Self::Data) -> bool;
// 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 written to.
Required Associated Types§
Required Methods§
Sourcefn channel_send(&mut self, data: Self::Data) -> bool
fn channel_send(&mut self, data: Self::Data) -> bool
Sends data to 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: From<Vec<u8>> + Clone + Send> ChannelCompatSend for Sender<D>
Available on crate feature tokio-channel
only.
impl<D: From<Vec<u8>> + Clone + Send> ChannelCompatSend for Sender<D>
Available on crate feature
tokio-channel
only.Source§impl<D: From<Vec<u8>> + Send> ChannelCompatSend for SyncSender<D>
impl<D: From<Vec<u8>> + Send> ChannelCompatSend for SyncSender<D>
Source§impl<D: From<Vec<u8>> + Send> ChannelCompatSend for Sender<D>
Available on crate feature tokio-channel
only.
impl<D: From<Vec<u8>> + Send> ChannelCompatSend for Sender<D>
Available on crate feature
tokio-channel
only.Source§impl<D: From<Vec<u8>> + Send> ChannelCompatSend for Sender<D>
Available on crate feature crossbeam-channel
only.
impl<D: From<Vec<u8>> + Send> ChannelCompatSend for Sender<D>
Available on crate feature
crossbeam-channel
only.Source§impl<D: From<Vec<u8>> + Send> ChannelCompatSend for UnboundedSender<D>
Available on crate feature tokio-channel
only.
impl<D: From<Vec<u8>> + Send> ChannelCompatSend for UnboundedSender<D>
Available on crate feature
tokio-channel
only.