Struct actix_web::actix::dev::Context

source ·
pub struct Context<A>where
    A: Actor<Context = Context<A>>,
{ /* private fields */ }
Expand description

Actor execution context

Implementations

Handle of the running future

SpawnHandle is the handle returned by AsyncContext::spawn() method.

Set mailbox capacity

By default mailbox capacity is 16 messages.

Trait Implementations

Immediately stop processing incoming messages and switch to a stopping state Read more
Terminate actor execution
Actor execution state
Spawn async future into context. Returns handle of the item, could be used for cancelling execution. Read more
Spawn future into the context. Stop processing any of incoming events until this future resolves. Read more
Check if context is paused (waiting for future completion or stopping)
Cancel future. handle is a value returned by spawn method.
Return Address of the context
This method register stream to an actor context and allows to handle Stream in similar way as normal actor messages. Read more
This method is similar to add_stream but it skips stream errors. Read more
Send message msg to self.
Send message msg to self after specified period of time. Returns spawn handle which could be used for cancellation. Notification get cancelled if context’s stop method get called. Read more
Execute closure after specified period of time within same Actor and Context. Execution get cancelled if context’s stop method get called. Read more
Spawns a job to execute the given closure periodically, at a specified fixed interval Read more
Formats the value using the given formatter. Read more
Pack message into suitable envelope

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.