[][src]Struct actori_web_actors::HttpContext

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

Execution context for http actors

Methods

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

pub fn create(actor: A) -> impl Stream<Item = Result<Bytes, Error>>[src]

Create a new HTTP Context from a request and an actor

pub fn with_factory<F>(f: F) -> impl Stream<Item = Result<Bytes, Error>> where
    F: FnOnce(&mut Self) -> A + 'static, 
[src]

Create a new HTTP Context

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

pub fn write(&mut self, data: Bytes)[src]

Write payload

pub fn write_eof(&mut self)[src]

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

pub fn handle(&self) -> SpawnHandle[src]

Handle of the running future

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

Trait Implementations

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

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

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

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

Auto Trait Implementations

impl<A> !RefUnwindSafe for HttpContext<A>

impl<A> !Send for HttpContext<A>

impl<A> !Sync for HttpContext<A>

impl<A> Unpin for HttpContext<A>

impl<A> !UnwindSafe for HttpContext<A>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,