Struct actix_web_actors::HttpContext[][src]

pub struct HttpContext<A> where
    A: Actor<Context = HttpContext<A>>, 
{ /* fields omitted */ }
Expand description

Execution context for HTTP actors

Implementations

Create a new HTTP Context from a request and an actor

Create a new HTTP Context

Write payload

Indicate end of streaming payload. Also this method calls Self::close.

Handle of the running future

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

Trait Implementations

Immediately stop processing incoming messages and switch to a stopping state. This only affects actors that are currently running. Future attempts to queue messages will fail. Read more

Terminate actor execution unconditionally. This sets the actor into the stopped state. This causes future attempts to queue messages to fail. Read more

Retrieve the current Actor execution state.

Spawns a future into the context. Read more

Spawns a future into the context, waiting for it to resolve. Read more

Cancels a spawned future. Read more

Returns the address of the context.

Checks if the context is paused (waiting for future completion or stopping).

Registers a stream with the context. Read more

Registers a stream with the context, ignoring errors. Read more

Sends the message msg to self. This bypasses the mailbox capacity, and will always queue the message. If the actor is in the stopped state, an error will be raised. Read more

Sends the message msg to self after a specified period of time. Read more

Executes a closure after a specified period of time. Read more

Spawns a job to execute the given closure periodically, at a specified fixed interval. 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

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more