Trait IntoSender

Source
pub trait IntoSender<M> {
    // Required methods
    fn into_sender(self) -> Sender<M>;
    fn as_sender(self: &Arc<Self>) -> Sender<M>;
}
Expand description

Extension functions to wrap a CanSend as a Sender.

Required Methods§

Source

fn into_sender(self) -> Sender<M>

This allows conversion of an owned CanSend into a Sender.

Source

fn as_sender(self: &Arc<Self>) -> Sender<M>

This allows conversion of a reference-counted CanSend into a Sender.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<M, T: CanSend<M>> IntoSender<M> for T