Struct actix_web::HttpContext [] [src]

pub struct HttpContext<A> where
    A: Actor<Context = HttpContext<A>> + Route
{ /* fields omitted */ }

Actor execution context

Methods

impl<A> HttpContext<A> where
    A: Actor<Context = Self> + Route
[src]

[src]

impl<A> HttpContext<A> where
    A: Actor<Context = Self> + Route
[src]

[src]

Shared application state

[src]

Start response processing

[src]

Write payload

[src]

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

[src]

Returns drain future

[src]

Check if connection still open

Trait Implementations

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

[src]

Stop actor execution

[src]

Terminate actor execution

[src]

Actor execution state

[src]

Check if execution context is alive

impl<A> AsyncContext<A> for HttpContext<A> where
    A: Actor<Context = Self> + Route
[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]

[src]

Get actor address

[src]

This method allow to handle Future in similar way as normal actor messages. Read more

[src]

This method is similar to add_future but works with streams. Read more

[src]

Send message msg to self after specified period of time. Returns spawn handle which could be used for cancelation. 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> ToEnvelope<A> for HttpContext<A> where
    A: Actor<Context = HttpContext<A>> + Route
[src]

[src]

Pack message into suitable envelope