[−][src]Trait actix::Handler
Describes how to handle messages of a specific type.
Implementing Handler
is a general way to handle incoming
messages, streams, and futures.
The type M
is a message which can be handled by the actor.
Associated Types
type Result: MessageResponse<Self, M>
The type of value that this handler will return.
Required methods
fn handle(&mut self, msg: M, ctx: &mut Self::Context) -> Self::Result
This method is called for every message received by this actor.
Implementors
impl Handler<Connect> for Resolver
[src]
impl Handler<Connect> for Resolver
type Result = ResponseActFuture<Self, TcpStream, ResolverError>
fn handle(&mut self, msg: Connect, _: &mut Self::Context) -> Self::Result | [src] |
impl Handler<ConnectAddr> for Resolver
[src]
impl Handler<ConnectAddr> for Resolver
type Result = ResponseActFuture<Self, TcpStream, ResolverError>
fn handle(&mut self, msg: ConnectAddr, _: &mut Self::Context) -> Self::Result | [src] |
impl Handler<Resolve> for Resolver
[src]
impl Handler<Resolve> for Resolver
type Result = ResponseActFuture<Self, VecDeque<SocketAddr>, ResolverError>
fn handle(&mut self, msg: Resolve, _: &mut Self::Context) -> Self::Result | [src] |
impl Handler<Signal> for DefaultSignalsHandler
[src]
impl Handler<Signal> for DefaultSignalsHandler
Handle SIGINT
, SIGTERM
, SIGQUIT
signals and send
a SystemExit(0)
message to the System
actor.
impl Handler<Subscribe> for ProcessSignals
[src]
impl Handler<Subscribe> for ProcessSignals
impl Handler<StopArbiter> for Arbiter
[src]
impl Handler<StopArbiter> for Arbiter
impl<A> Handler<StartActor<A>> for Arbiter where
A: Actor<Context = Context<A>>,
[src]
impl<A> Handler<StartActor<A>> for Arbiter where
A: Actor<Context = Context<A>>,
type Result = Addr<A>
fn handle(&mut self, msg: StartActor<A>, _: &mut Context<Self>) -> Addr<A> | [src] |
impl<I: Send, E: Send> Handler<Execute<I, E>> for Arbiter
[src]
impl<I: Send, E: Send> Handler<Execute<I, E>> for Arbiter
type Result = Result<I, E>
fn handle(&mut self, msg: Execute<I, E>, _: &mut Context<Self>) -> Result<I, E> | [src] |
impl<M: 'static, T: Sized + 'static> Handler<M> for Mocker<T> where
M: Message,
<M as Message>::Result: MessageResponse<Mocker<T>, M>,
[src]
impl<M: 'static, T: Sized + 'static> Handler<M> for Mocker<T> where
M: Message,
<M as Message>::Result: MessageResponse<Mocker<T>, M>,