Trait near_async::messaging::IntoAsyncSender
source · pub trait IntoAsyncSender<M, R> {
// 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§
sourcefn into_async_sender(self) -> AsyncSender<M, R>
fn into_async_sender(self) -> AsyncSender<M, R>
This allows conversion of an owned CanSendAsync into an AsyncSender.
sourcefn as_async_sender(self: &Arc<Self>) -> AsyncSender<M, R>
fn as_async_sender(self: &Arc<Self>) -> AsyncSender<M, R>
This allows conversion of a reference-counted CanSendAsync into an AsyncSender.