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

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 from_err<E: From<Self::Error>>(self) -> FromErr<Self, E>
    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
, { ... }
fn timeout(self, timeout: Duration, err: Self::Error) -> Timeout<Self>
    where
        Self: Sized
, { ... } }

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

ActorFuture is very similar to a regular Future, only with subsequent combinator closures accepting the actor and its context, in addition to the result.

ActorFuture allows for use cases where future processing requires access to the actor or its context.

Here is an example of a handler on a single actor, deferring work to another actor, and then updating the initiating actor's state:

This example is not tested
impl Message for SomeMessage {
    type Result = ();
}

impl Handler<DeferredWork> for OriginalActor {
    // Notice the `Response` is an `ActorFuture`-ized version of `Self::Message::Result`.
    type Result = ResponseActFuture<Self, (), Error>;

    fn handle(&mut self, _msg: Refresh, ctx: &mut Context<Self>) -> Self::Result {
        // this creates a `Future` representing the `.send` and subsequent `Result` from
        // `other_actor`
        let send_to_other = self.other_actor_addr
            .send(OtherMessage::new())
            .map_err(Error::from);

        // Wrap that `Future` so subsequent chained handlers can access
        // the `actor` (`self` in the  synchronous code) as well as the context.
        let send_to_other = actix::fut::wrap_future::<_, Self>(send_to_other);

        // once the wrapped future resolves, update this actor's state
        let update_self = send_to_other.map(|result, actor, _ctx| {
            // Actor's state updated here
            actor.inner_state.update_from(result);
        });

        // return the wrapped future
        Box::new(update_self)
    }
}

See also into_actor, which provides future conversion using trait

Associated Types

type Item

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

type Error

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

type Actor: Actor

The actor within which this future runs

Loading content...

Required methods

fn poll(
    &mut self,
    srv: &mut Self::Actor,
    ctx: &mut <Self::Actor as Actor>::Context
) -> Poll<Self::Item, Self::Error>

Loading content...

Provided methods

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

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

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

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

fn drop_err(self) -> DropErr<Self> where
    Self: Sized

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

fn from_err<E: From<Self::Error>>(self) -> FromErr<Self, E> where
    Self: Sized

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

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

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

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

Execute another future after this one has resolved successfully.

fn timeout(self, timeout: Duration, err: Self::Error) -> Timeout<Self> where
    Self: Sized

Add timeout to futures chain.

err value get returned as a timeout error.

Loading content...

Implementations on Foreign Types

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

type Item = F::Item

type Error = F::Error

type Actor = F::Actor

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
[src]

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
[src]

fn drop_err(self) -> DropErr<Self> where
    Self: Sized
[src]

fn from_err<E: From<Self::Error>>(self) -> FromErr<Self, E> where
    Self: Sized
[src]

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
[src]

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
[src]

fn timeout(self, timeout: Duration, err: Self::Error) -> Timeout<Self> where
    Self: Sized
[src]

Loading content...

Implementors

impl ActorFuture for TcpConnector[src]

type Item = TcpStream

type Error = ResolverError

type Actor = Resolver

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
[src]

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
[src]

fn drop_err(self) -> DropErr<Self> where
    Self: Sized
[src]

fn from_err<E: From<Self::Error>>(self) -> FromErr<Self, E> where
    Self: Sized
[src]

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
[src]

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
[src]

fn timeout(self, timeout: Duration, err: Self::Error) -> Timeout<Self> where
    Self: Sized
[src]

impl<A> ActorFuture for DropErr<A> where
    A: ActorFuture
[src]

type Item = A::Item

type Error = ()

type Actor = A::Actor

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
[src]

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
[src]

fn drop_err(self) -> DropErr<Self> where
    Self: Sized
[src]

fn from_err<E: From<Self::Error>>(self) -> FromErr<Self, E> where
    Self: Sized
[src]

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
[src]

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
[src]

fn timeout(self, timeout: Duration, err: Self::Error) -> Timeout<Self> where
    Self: Sized
[src]

impl<A> ActorFuture for TimerFunc<A> where
    A: Actor
[src]

type Item = ()

type Error = ()

type Actor = A

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
[src]

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
[src]

fn drop_err(self) -> DropErr<Self> where
    Self: Sized
[src]

fn from_err<E: From<Self::Error>>(self) -> FromErr<Self, E> where
    Self: Sized
[src]

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
[src]

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
[src]

fn timeout(self, timeout: Duration, err: Self::Error) -> Timeout<Self> where
    Self: Sized
[src]

impl<A, B> ActorFuture for Either<A, B> where
    A: ActorFuture,
    B: ActorFuture<Item = A::Item, Error = A::Error, Actor = A::Actor>, 
[src]

type Item = A::Item

type Error = A::Error

type Actor = A::Actor

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
[src]

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
[src]

fn drop_err(self) -> DropErr<Self> where
    Self: Sized
[src]

fn from_err<E: From<Self::Error>>(self) -> FromErr<Self, E> where
    Self: Sized
[src]

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
[src]

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
[src]

fn timeout(self, timeout: Duration, err: Self::Error) -> Timeout<Self> where
    Self: Sized
[src]

impl<A, B, F> ActorFuture for AndThen<A, B, F> where
    A: ActorFuture,
    B: IntoActorFuture<Actor = A::Actor, Error = A::Error>,
    F: FnOnce(A::Item, &mut A::Actor, &mut <A::Actor as Actor>::Context) -> B, 
[src]

type Item = B::Item

type Error = B::Error

type Actor = A::Actor

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
[src]

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
[src]

fn drop_err(self) -> DropErr<Self> where
    Self: Sized
[src]

fn from_err<E: From<Self::Error>>(self) -> FromErr<Self, E> where
    Self: Sized
[src]

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
[src]

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
[src]

fn timeout(self, timeout: Duration, err: Self::Error) -> Timeout<Self> where
    Self: Sized
[src]

impl<A, B, F> ActorFuture for Then<A, B, F> where
    A: ActorFuture,
    B: IntoActorFuture<Actor = A::Actor>,
    F: FnOnce(Result<A::Item, A::Error>, &mut A::Actor, &mut <A::Actor as Actor>::Context) -> B, 
[src]

type Item = B::Item

type Error = B::Error

type Actor = A::Actor

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
[src]

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
[src]

fn drop_err(self) -> DropErr<Self> where
    Self: Sized
[src]

fn from_err<E: From<Self::Error>>(self) -> FromErr<Self, E> where
    Self: Sized
[src]

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
[src]

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
[src]

fn timeout(self, timeout: Duration, err: Self::Error) -> Timeout<Self> where
    Self: Sized
[src]

impl<A: ActorFuture, E: From<A::Error>> ActorFuture for FromErr<A, E>[src]

type Item = A::Item

type Error = E

type Actor = A::Actor

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
[src]

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
[src]

fn drop_err(self) -> DropErr<Self> where
    Self: Sized
[src]

fn from_err<E: From<Self::Error>>(self) -> FromErr<Self, E> where
    Self: Sized
[src]

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
[src]

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
[src]

fn timeout(self, timeout: Duration, err: Self::Error) -> Timeout<Self> where
    Self: Sized
[src]

impl<F> ActorFuture for Timeout<F> where
    F: ActorFuture
[src]

type Item = F::Item

type Error = F::Error

type Actor = F::Actor

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
[src]

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
[src]

fn drop_err(self) -> DropErr<Self> where
    Self: Sized
[src]

fn from_err<E: From<Self::Error>>(self) -> FromErr<Self, E> where
    Self: Sized
[src]

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
[src]

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
[src]

fn timeout(self, timeout: Duration, err: Self::Error) -> Timeout<Self> where
    Self: Sized
[src]

impl<F, A> ActorFuture for FutureWrap<F, A> where
    F: Future,
    A: Actor
[src]

type Item = F::Item

type Error = F::Error

type Actor = A

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
[src]

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
[src]

fn drop_err(self) -> DropErr<Self> where
    Self: Sized
[src]

fn from_err<E: From<Self::Error>>(self) -> FromErr<Self, E> where
    Self: Sized
[src]

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
[src]

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
[src]

fn timeout(self, timeout: Duration, err: Self::Error) -> Timeout<Self> where
    Self: Sized
[src]

impl<S> ActorFuture for StreamFinish<S> where
    S: ActorStream
[src]

type Item = ()

type Error = S::Error

type Actor = S::Actor

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
[src]

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
[src]

fn drop_err(self) -> DropErr<Self> where
    Self: Sized
[src]

fn from_err<E: From<Self::Error>>(self) -> FromErr<Self, E> where
    Self: Sized
[src]

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
[src]

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
[src]

fn timeout(self, timeout: Duration, err: Self::Error) -> Timeout<Self> where
    Self: Sized
[src]

impl<S, F, Fut, T> ActorFuture for StreamFold<S, F, Fut, T> where
    S: ActorStream,
    F: FnMut(T, S::Item, &mut S::Actor, &mut <S::Actor as Actor>::Context) -> Fut,
    Fut: IntoActorFuture<Item = T, Actor = S::Actor>,
    S::Error: From<Fut::Error>, 
[src]

type Item = T

type Error = S::Error

type Actor = S::Actor

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
[src]

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
[src]

fn drop_err(self) -> DropErr<Self> where
    Self: Sized
[src]

fn from_err<E: From<Self::Error>>(self) -> FromErr<Self, E> where
    Self: Sized
[src]

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
[src]

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
[src]

fn timeout(self, timeout: Duration, err: Self::Error) -> Timeout<Self> where
    Self: Sized
[src]

impl<T, E, A> ActorFuture for FutureResult<T, E, A> where
    A: Actor
[src]

type Item = T

type Error = E

type Actor = A

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
[src]

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
[src]

fn drop_err(self) -> DropErr<Self> where
    Self: Sized
[src]

fn from_err<E: From<Self::Error>>(self) -> FromErr<Self, E> where
    Self: Sized
[src]

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
[src]

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
[src]

fn timeout(self, timeout: Duration, err: Self::Error) -> Timeout<Self> where
    Self: Sized
[src]

impl<U, A, F> ActorFuture for Map<A, F> where
    A: ActorFuture,
    F: FnOnce(A::Item, &mut A::Actor, &mut <A::Actor as Actor>::Context) -> U, 
[src]

type Item = U

type Error = A::Error

type Actor = A::Actor

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
[src]

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
[src]

fn drop_err(self) -> DropErr<Self> where
    Self: Sized
[src]

fn from_err<E: From<Self::Error>>(self) -> FromErr<Self, E> where
    Self: Sized
[src]

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
[src]

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
[src]

fn timeout(self, timeout: Duration, err: Self::Error) -> Timeout<Self> where
    Self: Sized
[src]

impl<U, A, F> ActorFuture for MapErr<A, F> where
    A: ActorFuture,
    F: FnOnce(A::Error, &mut A::Actor, &mut <A::Actor as Actor>::Context) -> U, 
[src]

type Item = A::Item

type Error = U

type Actor = A::Actor

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
[src]

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
[src]

fn drop_err(self) -> DropErr<Self> where
    Self: Sized
[src]

fn from_err<E: From<Self::Error>>(self) -> FromErr<Self, E> where
    Self: Sized
[src]

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
[src]

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
[src]

fn timeout(self, timeout: Duration, err: Self::Error) -> Timeout<Self> where
    Self: Sized
[src]

Loading content...