Trait near_async::messaging::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.

Object Safety§

This trait is not object safe.

Implementors§

source§

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