Trait actix::prelude::actix::Handler
[−]
[src]
pub trait Handler<M> where
Self: Actor,
M: ResponseType, { type Result: IntoResponse<Self, M>; fn handle(&mut self, msg: M, ctx: &mut Self::Context) -> Self::Result; }
Message handler
Handler
implementation is a general way how to handle
incoming messages, streams, futures.
M
is a message which can be handled by the actor.
Associated Types
type Result: IntoResponse<Self, M>
Required Methods
fn handle(&mut self, msg: M, ctx: &mut Self::Context) -> Self::Result
Method is called for every message received by this Actor
Implementors
impl Handler<StopArbiter> for Arbiter type Result = ();
impl<A> Handler<StartActor<A>> for Arbiter where
A: Actor<Context = Context<A>>, type Result = SyncAddress<A>;impl<I: Send, E: Send> Handler<Execute<I, E>> for Arbiter type Result = Result<I, E>;
impl Handler<SystemExit> for System type Result = ();
impl Handler<Subscribe> for ProcessSignals type Result = ();
impl Handler<Signal> for DefaultSignalsHandler type Result = ();
impl Handler<GetAddressInfo> for DnsResolver type Result = Result<Vec<AddrInfo>, LookupError>;