Trait actix_web::actix::fut::ActorFuture[][src]

pub trait ActorFuture {
    type Item;
    type Error;
    type Actor: Actor;
    fn poll(
        &mut self,
        srv: &mut Self::Actor,
        ctx: &mut <Self::Actor as Actor>::Context
    ) -> Result<Async<Self::Item>, Self::Error>; fn map<F, U>(self, f: F) -> Map<Self, F>
    where
        F: FnOnce(Self::Item, &mut Self::Actor, &mut <Self::Actor as Actor>::Context) -> U
, { ... }
fn map_err<F, E>(self, f: F) -> MapErr<Self, F>
    where
        F: FnOnce(Self::Error, &mut Self::Actor, &mut <Self::Actor as Actor>::Context) -> E
, { ... }
fn drop_err(self) -> DropErr<Self> { ... }
fn from_err<E>(self) -> FromErr<Self, E>
    where
        E: From<Self::Error>
, { ... }
fn then<F, B>(self, f: F) -> Then<Self, B, F>
    where
        B: IntoActorFuture<Actor = Self::Actor>,
        F: FnOnce(Result<Self::Item, Self::Error>, &mut Self::Actor, &mut <Self::Actor as Actor>::Context) -> B
, { ... }
fn and_then<F, B>(self, f: F) -> AndThen<Self, B, F>
    where
        B: IntoActorFuture<Error = Self::Error, Actor = Self::Actor>,
        F: FnOnce(Self::Item, &mut Self::Actor, &mut <Self::Actor as Actor>::Context) -> B
, { ... }
fn timeout(self, timeout: Duration, err: Self::Error) -> Timeout<Self> { ... } }
[]

Trait for types which are a placeholder of a value that may become available at some later point in time.

This is similar to futures::Future trait, except it works with Actor

Associated Types

[]

The type of value that this future will resolved with if it is successful.

[]

The type of error that this future will resolve with if it fails in a normal fashion.

[]

The actor within which this future runs

Required Methods

Provided Methods

[]

Map this future's result to a different type, returning a new future of the resulting type.

[]

Map this future's error to a different error, returning a new future.

[]

Drop this future's error, returning a new future.

[]

Map this future's error to any error implementing From for this future's Error, returning a new future.

[]

Chain on a computation for when a future finished, passing the result of the future to the provided closure f.

[]

Execute another future after this one has resolved successfully.

[]

Add timeout to futures chain.

err value get returned as a timeout error.

Implementations on Foreign Types

impl<F> ActorFuture for Box<F> where
    F: ActorFuture + ?Sized
[src]

[]

Implementors