Trait near_async::messaging::CanSend

source ·
pub trait CanSend<M>:
    Send
    + Sync
    + 'static {
    // Required method
    fn send(&self, message: M);
}
Expand description

Trait for sending a typed message. The sent message is then handled by the Handler trait. actix::Addr, which is derived from actix::Actor is an example of a struct that implements CanSend. See Handler trait for more details.

Required Methods§

source

fn send(&self, message: M)

Implementations on Foreign Types§

source§

impl<M, A> CanSend<MessageWithCallback<M, <M as Message>::Result>> for Addr<A>
where M: Message + Send + 'static, M::Result: Send, A: Actor + Handler<M>, A::Context: ToEnvelope<A, M>,

source§

fn send(&self, message: MessageWithCallback<M, M::Result>)

source§

impl<M, A> CanSend<M> for Addr<A>
where M: Message + Send + 'static, M::Result: Send, A: Actor + Handler<M>, A::Context: ToEnvelope<A, M>,

An actix Addr implements CanSend for any message type that the actor handles.

source§

fn send(&self, message: M)

Implementors§

source§

impl<M> CanSend<M> for Noop

source§

impl<M, S> CanSend<MessageWithCallback<M, <M as Message>::Result>> for AddrWithAutoSpanContext<S>
where M: Message + Send + 'static, M::Result: Send, S: Actor, Addr<S>: CanSend<MessageWithCallback<WithSpanContext<M>, M::Result>>,

source§

impl<M, S> CanSend<M> for AddrWithAutoSpanContext<S>
where M: Message + 'static, S: Actor, Addr<S>: CanSend<WithSpanContext<M>>,

source§

impl<M, S: CanSend<M>> CanSend<M> for LateBoundSender<S>

Allows LateBoundSender to be convertible to a Sender as long as the inner object could be.

source§

impl<Message, Event: From<Message> + 'static> CanSend<Message> for DelaySender<Event>

source§

impl<S, M: From<S> + 'static> CanSend<S> for BreakApart<M>