Struct actix_web::HttpContext[][src]

pub struct HttpContext<A, S = ()> where
    A: Actor<Context = HttpContext<A, S>>, 
{ /* fields omitted */ }

Execution context for http actors

Methods

impl<A, S: 'static> HttpContext<A, S> where
    A: Actor<Context = Self>, 
[src]

Create a new HTTP Context from a request and an actor

Create a new HTTP Context

impl<A, S> HttpContext<A, S> where
    A: Actor<Context = Self>, 
[src]

Important traits for &'a mut R

Shared application state

Incoming request

Write payload

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

Returns drain future

Check if connection still open

Handle of the running future

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

Trait Implementations

impl<A, S> ActorContext for HttpContext<A, S> where
    A: Actor<Context = Self>, 
[src]

Immediately stop processing incoming messages and switch to a stopping state Read more

Terminate actor execution

Actor execution state

impl<A, S> AsyncContext<A> for HttpContext<A, S> where
    A: Actor<Context = Self>, 
[src]

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

Cancel future. handle is a value returned by spawn method.

Return Address of the context

Check if context is paused (waiting for future completion or stopping)

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 job to execute closure with specified interval

impl<A, S> AsyncContextParts<A> for HttpContext<A, S> where
    A: Actor<Context = Self>, 
[src]

impl<A, M, S> ToEnvelope<A, M> for HttpContext<A, S> where
    A: Actor<Context = HttpContext<A, S>> + Handler<M>,
    M: Message + Send + 'static,
    M::Result: Send
[src]

Pack message into suitable envelope

Auto Trait Implementations

impl<A, S = ()> !Send for HttpContext<A, S>

impl<A, S = ()> !Sync for HttpContext<A, S>