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§
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>
An actix Addr implements CanSend for any message type that the actor handles.
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, A> CanSend<M> for TestLoopSender<A>
impl<M, R, A> CanSend<MessageWithCallback<M, R>> for TestLoopSender<A>
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.