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.
Required Methods§
Implementations on Foreign Types§
source§impl<M, A> CanSend<MessageWithCallback<M, <M as Message>::Result>> for Addr<A>
impl<M, A> CanSend<MessageWithCallback<M, <M as Message>::Result>> for Addr<A>
fn send(&self, message: MessageWithCallback<M, M::Result>)
source§impl<M, A> CanSend<M> for Addr<A>
impl<M, A> CanSend<M> for Addr<A>
An actix Addr implements CanSend for any message type that the actor handles.
Implementors§
impl<M> CanSend<M> for Noop
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>>,
impl<M, S> CanSend<M> for AddrWithAutoSpanContext<S>
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.