IntoAsyncSender

Trait IntoAsyncSender 

Source
pub trait IntoAsyncSender<M, R: Send> {
    // Required methods
    fn into_async_sender(self) -> AsyncSender<M, R>;
    fn as_async_sender(self: &Arc<Self>) -> AsyncSender<M, R>;
}
Expand description

Extension functions to wrap a CanSendAsync as an AsyncSender.

Required Methods§

Source

fn into_async_sender(self) -> AsyncSender<M, R>

Convert an owned implementer into an AsyncSender.

Source

fn as_async_sender(self: &Arc<Self>) -> AsyncSender<M, R>

Convert a reference-counted implementer into an AsyncSender.

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, R: Send + 'static, T: CanSendAsync<M, R>> IntoAsyncSender<M, R> for T