Trait ChannelCompatSend

Source
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§

Source

type Data: From<Vec<u8>>

The type of data that the channel can send.

Required Methods§

Source

fn channel_send(&mut self, data: Self::Data) -> bool

Sends data to the channel.

Provided Methods§

Source

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.
Source§

type Data = D

Source§

fn channel_send(&mut self, data: Self::Data) -> bool

Source§

impl<D: From<Vec<u8>> + Send> ChannelCompatSend for Sender<D>

Source§

type Data = D

Source§

fn channel_send(&mut self, data: Self::Data) -> bool

Source§

impl<D: From<Vec<u8>> + Send> ChannelCompatSend for SyncSender<D>

Source§

type Data = D

Source§

fn channel_send(&mut self, data: Self::Data) -> bool

Source§

impl<D: From<Vec<u8>> + Send> ChannelCompatSend for Sender<D>

Available on crate feature tokio-channel only.
Source§

type Data = D

Source§

fn channel_send(&mut self, data: Self::Data) -> bool

Source§

impl<D: From<Vec<u8>> + Send> ChannelCompatSend for Sender<D>

Available on crate feature crossbeam-channel only.
Source§

type Data = D

Source§

fn channel_send(&mut self, data: Self::Data) -> bool

Source§

impl<D: From<Vec<u8>> + Send> ChannelCompatSend for UnboundedSender<D>

Available on crate feature tokio-channel only.
Source§

type Data = D

Source§

fn channel_send(&mut self, data: Self::Data) -> bool

Implementors§