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]

[src]

[src]

[src]

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

Important traits for &'a mut W
[src]

Shared application state

Important traits for HttpRequest<S>
[src]

Incoming request

[src]

Write payload

[src]

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

[src]

Returns drain future

[src]

Check if connection still open

[src]

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]

[src]

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

[src]

Terminate actor execution

[src]

Actor execution state

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

[src]

Spawn async future into context. Returns handle of the item, could be used for cancelling execution. Read more

[src]

Spawn future into the context. Stop processing any of incoming events until this future resolves. Read more

[src]

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

[src]

Get actor address

[src]

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

[src]

This method register stream to an actor context and allows to handle Stream in similar way as normal actor messages. Read more

[src]

This method is similar to add_stream but it skips stream errors. Read more

[src]

Send message msg to self.

[src]

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

[src]

Execute closure after specified period of time within same Actor and Context. Execution get cancelled if context's stop method get called. Read more

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

[src]

Pack message into suitable envelope

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

[src]

Performs the conversion.

Auto Trait Implementations

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

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