CanSendAsync

Trait CanSendAsync 

Source
pub trait CanSendAsync<M, R>:
    Send
    + Sync
    + 'static {
    // Required method
    fn send_async(
        &self,
        message: M,
    ) -> BoxFuture<'static, Result<R, AsyncSendError>>;
}
Expand description

Trait for sending a typed message async. The sent message is then handled by the Handler trait. See Handler<M, R> trait for more details.

Required Methods§

Source

fn send_async( &self, message: M, ) -> BoxFuture<'static, Result<R, AsyncSendError>>

Implementations on Foreign Types§

Source§

impl<M, R: Send + 'static> CanSendAsync<M, R> for Arc<Noop>

Source§

fn send_async( &self, _message: M, ) -> BoxFuture<'static, Result<R, AsyncSendError>>

Implementors§

Source§

impl<A, M, R> CanSendAsync<M, R> for MultithreadRuntimeHandle<A>
where A: Handler<M, R> + 'static, M: Debug + Send + 'static, R: Send + 'static,

Source§

impl<A, M, R> CanSendAsync<M, R> for TokioRuntimeHandle<A>
where A: HandlerWithContext<M, R> + 'static, M: Debug + Send + 'static, R: Send + 'static,

Source§

impl<M, R, A> CanSendAsync<M, R> for TestLoopSender<A>
where M: Debug + Send + 'static, A: Actor + HandlerWithContext<M, R> + 'static, R: Send + 'static,

Source§

impl<M, R, S: CanSendAsync<M, R>> CanSendAsync<M, R> for LateBoundSender<S>

Source§

impl<M, R: Send + 'static> CanSendAsync<M, R> for Noop