Trait 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
    ) -> Poll<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,
        Self: Sized
, { ... }
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,
        Self: Sized
, { ... }
fn drop_err(self) -> DropErr<Self>
    where
        Self: Sized
, { ... }
fn then<F, B>(self, f: F) -> Then<Self, B, F>
    where
        F: FnOnce(Result<Self::Item, Self::Error>, &mut Self::Actor, &mut <Self::Actor as Actor>::Context) -> B,
        B: IntoActorFuture<Actor = Self::Actor>,
        Self: Sized
, { ... }
fn and_then<F, B>(self, f: F) -> AndThen<Self, B, F>
    where
        F: FnOnce(Self::Item, &mut Self::Actor, &mut <Self::Actor as Actor>::Context) -> B,
        B: IntoActorFuture<Error = Self::Error, Actor = Self::Actor>,
        Self: Sized
, { ... } }

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.

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.

Implementors