[−][src]Trait actix_web::actix::fut::ActorFuture
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:
impl Message for SomeMessage { type Result = (); } impl Handler<DeferredWork> for OriginalActor { type Result = ResponseActFuture<Self, (), Error>; fn handle(&mut self, _msg: Refresh, ctx: &mut Context<Self>) -> Self::Result { let send_to_other = self.other_actor_addr .send(OtherMessage::new()) .map_err(Error::from); let update_self = wrap_future::<_, Self>(send_to_other).map(|result, actor, _ctx| { // Actor's state updated here actor.inner_state.update_from(result); }); // return the wrapping 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
Required methods
fn poll(
&mut self,
srv: &mut Self::Actor,
ctx: &mut <Self::Actor as Actor>::Context
) -> Result<Async<Self::Item>, Self::Error>
&mut self,
srv: &mut Self::Actor,
ctx: &mut <Self::Actor as Actor>::Context
) -> Result<Async<Self::Item>, Self::Error>
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,
F: FnOnce(Self::Item, &mut Self::Actor, &mut <Self::Actor as Actor>::Context) -> U,
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,
F: FnOnce(Self::Error, &mut Self::Actor, &mut <Self::Actor as Actor>::Context) -> E,
Map this future's error to a different error, returning a new future.
fn drop_err(self) -> DropErr<Self>
Drop this future's error, returning a new future.
fn from_err<E>(self) -> FromErr<Self, E> where
E: From<Self::Error>,
E: From<Self::Error>,
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
B: IntoActorFuture<Actor = Self::Actor>,
F: FnOnce(Result<Self::Item, Self::Error>, &mut Self::Actor, &mut <Self::Actor as Actor>::Context) -> B,
B: IntoActorFuture<Actor = Self::Actor>,
F: FnOnce(Result<Self::Item, Self::Error>, &mut Self::Actor, &mut <Self::Actor as Actor>::Context) -> B,
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
B: IntoActorFuture<Error = Self::Error, Actor = Self::Actor>,
F: FnOnce(Self::Item, &mut Self::Actor, &mut <Self::Actor as Actor>::Context) -> B,
B: IntoActorFuture<Error = Self::Error, Actor = Self::Actor>,
F: FnOnce(Self::Item, &mut Self::Actor, &mut <Self::Actor as Actor>::Context) -> B,
Execute another future after this one has resolved successfully.
fn timeout(self, timeout: Duration, err: Self::Error) -> Timeout<Self>
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]
F: ActorFuture + ?Sized,
type Item = <F as ActorFuture>::Item
type Error = <F as ActorFuture>::Error
type Actor = <F as ActorFuture>::Actor
fn poll(
&mut self,
srv: &mut <Box<F> as ActorFuture>::Actor,
ctx: &mut <<Box<F> as ActorFuture>::Actor as Actor>::Context
) -> Result<Async<<Box<F> as ActorFuture>::Item>, <Box<F> as ActorFuture>::Error>
[src]
&mut self,
srv: &mut <Box<F> as ActorFuture>::Actor,
ctx: &mut <<Box<F> as ActorFuture>::Actor as Actor>::Context
) -> Result<Async<<Box<F> as ActorFuture>::Item>, <Box<F> as ActorFuture>::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,
[src]
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,
[src]
F: FnOnce(Self::Error, &mut Self::Actor, &mut <Self::Actor as Actor>::Context) -> E,
fn drop_err(self) -> DropErr<Self>
[src]
fn from_err<E>(self) -> FromErr<Self, E> where
E: From<Self::Error>,
[src]
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,
[src]
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,
[src]
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>
[src]
Implementors
impl ActorFuture for TcpConnector
[src]
type Item = TcpStream
type Error = ResolverError
type Actor = Resolver
fn poll(
&mut self,
&mut Resolver,
&mut Context<Resolver>
) -> Result<Async<<TcpConnector as ActorFuture>::Item>, <TcpConnector as ActorFuture>::Error>
[src]
&mut self,
&mut Resolver,
&mut Context<Resolver>
) -> Result<Async<<TcpConnector as ActorFuture>::Item>, <TcpConnector as ActorFuture>::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,
[src]
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,
[src]
F: FnOnce(Self::Error, &mut Self::Actor, &mut <Self::Actor as Actor>::Context) -> E,
fn drop_err(self) -> DropErr<Self>
[src]
fn from_err<E>(self) -> FromErr<Self, E> where
E: From<Self::Error>,
[src]
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,
[src]
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,
[src]
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>
[src]
impl<A> ActorFuture for DropErr<A> where
A: ActorFuture,
[src]
A: ActorFuture,
type Item = <A as ActorFuture>::Item
type Error = ()
type Actor = <A as ActorFuture>::Actor
fn poll(
&mut self,
act: &mut <A as ActorFuture>::Actor,
ctx: &mut <<A as ActorFuture>::Actor as Actor>::Context
) -> Result<Async<<A as ActorFuture>::Item>, ()>
[src]
&mut self,
act: &mut <A as ActorFuture>::Actor,
ctx: &mut <<A as ActorFuture>::Actor as Actor>::Context
) -> Result<Async<<A as ActorFuture>::Item>, ()>
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,
[src]
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,
[src]
F: FnOnce(Self::Error, &mut Self::Actor, &mut <Self::Actor as Actor>::Context) -> E,
fn drop_err(self) -> DropErr<Self>
[src]
fn from_err<E>(self) -> FromErr<Self, E> where
E: From<Self::Error>,
[src]
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,
[src]
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,
[src]
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>
[src]
impl<A> ActorFuture for TimerFunc<A> where
A: Actor,
[src]
A: Actor,
type Item = ()
type Error = ()
type Actor = A
fn poll(
&mut self,
act: &mut <TimerFunc<A> as ActorFuture>::Actor,
ctx: &mut <<TimerFunc<A> as ActorFuture>::Actor as Actor>::Context
) -> Result<Async<<TimerFunc<A> as ActorFuture>::Item>, <TimerFunc<A> as ActorFuture>::Error>
[src]
&mut self,
act: &mut <TimerFunc<A> as ActorFuture>::Actor,
ctx: &mut <<TimerFunc<A> as ActorFuture>::Actor as Actor>::Context
) -> Result<Async<<TimerFunc<A> as ActorFuture>::Item>, <TimerFunc<A> as ActorFuture>::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,
[src]
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,
[src]
F: FnOnce(Self::Error, &mut Self::Actor, &mut <Self::Actor as Actor>::Context) -> E,
fn drop_err(self) -> DropErr<Self>
[src]
fn from_err<E>(self) -> FromErr<Self, E> where
E: From<Self::Error>,
[src]
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,
[src]
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,
[src]
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>
[src]
impl<A, B> ActorFuture for Either<A, B> where
A: ActorFuture,
B: ActorFuture<Item = <A as ActorFuture>::Item, Error = <A as ActorFuture>::Error, Actor = <A as ActorFuture>::Actor>,
[src]
A: ActorFuture,
B: ActorFuture<Item = <A as ActorFuture>::Item, Error = <A as ActorFuture>::Error, Actor = <A as ActorFuture>::Actor>,
type Item = <A as ActorFuture>::Item
type Error = <A as ActorFuture>::Error
type Actor = <A as ActorFuture>::Actor
fn poll(
&mut self,
act: &mut <A as ActorFuture>::Actor,
ctx: &mut <<A as ActorFuture>::Actor as Actor>::Context
) -> Result<Async<<A as ActorFuture>::Item>, <B as ActorFuture>::Error>
[src]
&mut self,
act: &mut <A as ActorFuture>::Actor,
ctx: &mut <<A as ActorFuture>::Actor as Actor>::Context
) -> Result<Async<<A as ActorFuture>::Item>, <B as ActorFuture>::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,
[src]
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,
[src]
F: FnOnce(Self::Error, &mut Self::Actor, &mut <Self::Actor as Actor>::Context) -> E,
fn drop_err(self) -> DropErr<Self>
[src]
fn from_err<E>(self) -> FromErr<Self, E> where
E: From<Self::Error>,
[src]
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,
[src]
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,
[src]
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>
[src]
impl<A, B, F> ActorFuture for AndThen<A, B, F> where
A: ActorFuture,
B: IntoActorFuture<Actor = <A as ActorFuture>::Actor, Error = <A as ActorFuture>::Error>,
F: FnOnce(<A as ActorFuture>::Item, &mut <A as ActorFuture>::Actor, &mut <<A as ActorFuture>::Actor as Actor>::Context) -> B,
[src]
A: ActorFuture,
B: IntoActorFuture<Actor = <A as ActorFuture>::Actor, Error = <A as ActorFuture>::Error>,
F: FnOnce(<A as ActorFuture>::Item, &mut <A as ActorFuture>::Actor, &mut <<A as ActorFuture>::Actor as Actor>::Context) -> B,
type Item = <B as IntoActorFuture>::Item
type Error = <B as IntoActorFuture>::Error
type Actor = <A as ActorFuture>::Actor
fn poll(
&mut self,
act: &mut <A as ActorFuture>::Actor,
ctx: &mut <<A as ActorFuture>::Actor as Actor>::Context
) -> Result<Async<<B as IntoActorFuture>::Item>, <B as IntoActorFuture>::Error>
[src]
&mut self,
act: &mut <A as ActorFuture>::Actor,
ctx: &mut <<A as ActorFuture>::Actor as Actor>::Context
) -> Result<Async<<B as IntoActorFuture>::Item>, <B as IntoActorFuture>::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,
[src]
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,
[src]
F: FnOnce(Self::Error, &mut Self::Actor, &mut <Self::Actor as Actor>::Context) -> E,
fn drop_err(self) -> DropErr<Self>
[src]
fn from_err<E>(self) -> FromErr<Self, E> where
E: From<Self::Error>,
[src]
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,
[src]
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,
[src]
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>
[src]
impl<A, B, F> ActorFuture for Then<A, B, F> where
A: ActorFuture,
B: IntoActorFuture<Actor = <A as ActorFuture>::Actor>,
F: FnOnce(Result<<A as ActorFuture>::Item, <A as ActorFuture>::Error>, &mut <A as ActorFuture>::Actor, &mut <<A as ActorFuture>::Actor as Actor>::Context) -> B,
[src]
A: ActorFuture,
B: IntoActorFuture<Actor = <A as ActorFuture>::Actor>,
F: FnOnce(Result<<A as ActorFuture>::Item, <A as ActorFuture>::Error>, &mut <A as ActorFuture>::Actor, &mut <<A as ActorFuture>::Actor as Actor>::Context) -> B,
type Item = <B as IntoActorFuture>::Item
type Error = <B as IntoActorFuture>::Error
type Actor = <A as ActorFuture>::Actor
fn poll(
&mut self,
act: &mut <A as ActorFuture>::Actor,
ctx: &mut <<A as ActorFuture>::Actor as Actor>::Context
) -> Result<Async<<B as IntoActorFuture>::Item>, <B as IntoActorFuture>::Error>
[src]
&mut self,
act: &mut <A as ActorFuture>::Actor,
ctx: &mut <<A as ActorFuture>::Actor as Actor>::Context
) -> Result<Async<<B as IntoActorFuture>::Item>, <B as IntoActorFuture>::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,
[src]
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,
[src]
F: FnOnce(Self::Error, &mut Self::Actor, &mut <Self::Actor as Actor>::Context) -> E,
fn drop_err(self) -> DropErr<Self>
[src]
fn from_err<E>(self) -> FromErr<Self, E> where
E: From<Self::Error>,
[src]
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,
[src]
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,
[src]
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>
[src]
impl<A, E> ActorFuture for FromErr<A, E> where
A: ActorFuture,
E: From<<A as ActorFuture>::Error>,
[src]
A: ActorFuture,
E: From<<A as ActorFuture>::Error>,
type Item = <A as ActorFuture>::Item
type Error = E
type Actor = <A as ActorFuture>::Actor
fn poll(
&mut self,
act: &mut <A as ActorFuture>::Actor,
ctx: &mut <<A as ActorFuture>::Actor as Actor>::Context
) -> Result<Async<<A as ActorFuture>::Item>, E>
[src]
&mut self,
act: &mut <A as ActorFuture>::Actor,
ctx: &mut <<A as ActorFuture>::Actor as Actor>::Context
) -> Result<Async<<A as ActorFuture>::Item>, E>
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,
[src]
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,
[src]
F: FnOnce(Self::Error, &mut Self::Actor, &mut <Self::Actor as Actor>::Context) -> E,
fn drop_err(self) -> DropErr<Self>
[src]
fn from_err<E>(self) -> FromErr<Self, E> where
E: From<Self::Error>,
[src]
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,
[src]
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,
[src]
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>
[src]
impl<A: Actor> ActorFuture for Drain<A>
[src]
type Item = ()
type Error = ()
type Actor = A
fn poll(
&mut self,
_: &mut A,
_: &mut <Self::Actor as Actor>::Context
) -> Poll<Self::Item, Self::Error>
[src]
&mut self,
_: &mut A,
_: &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,
[src]
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,
[src]
F: FnOnce(Self::Error, &mut Self::Actor, &mut <Self::Actor as Actor>::Context) -> E,
fn drop_err(self) -> DropErr<Self>
[src]
fn from_err<E>(self) -> FromErr<Self, E> where
E: From<Self::Error>,
[src]
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,
[src]
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,
[src]
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>
[src]
impl<F> ActorFuture for Timeout<F> where
F: ActorFuture,
[src]
F: ActorFuture,
type Item = <F as ActorFuture>::Item
type Error = <F as ActorFuture>::Error
type Actor = <F as ActorFuture>::Actor
fn poll(
&mut self,
act: &mut <F as ActorFuture>::Actor,
ctx: &mut <<F as ActorFuture>::Actor as Actor>::Context
) -> Result<Async<<F as ActorFuture>::Item>, <F as ActorFuture>::Error>
[src]
&mut self,
act: &mut <F as ActorFuture>::Actor,
ctx: &mut <<F as ActorFuture>::Actor as Actor>::Context
) -> Result<Async<<F as ActorFuture>::Item>, <F as ActorFuture>::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,
[src]
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,
[src]
F: FnOnce(Self::Error, &mut Self::Actor, &mut <Self::Actor as Actor>::Context) -> E,
fn drop_err(self) -> DropErr<Self>
[src]
fn from_err<E>(self) -> FromErr<Self, E> where
E: From<Self::Error>,
[src]
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,
[src]
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,
[src]
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>
[src]
impl<F, A> ActorFuture for FutureWrap<F, A> where
A: Actor,
F: Future,
[src]
A: Actor,
F: Future,
type Item = <F as Future>::Item
type Error = <F as Future>::Error
type Actor = A
fn poll(
&mut self,
&mut <FutureWrap<F, A> as ActorFuture>::Actor,
&mut <<FutureWrap<F, A> as ActorFuture>::Actor as Actor>::Context
) -> Result<Async<<FutureWrap<F, A> as ActorFuture>::Item>, <FutureWrap<F, A> as ActorFuture>::Error>
[src]
&mut self,
&mut <FutureWrap<F, A> as ActorFuture>::Actor,
&mut <<FutureWrap<F, A> as ActorFuture>::Actor as Actor>::Context
) -> Result<Async<<FutureWrap<F, A> as ActorFuture>::Item>, <FutureWrap<F, A> as ActorFuture>::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,
[src]
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,
[src]
F: FnOnce(Self::Error, &mut Self::Actor, &mut <Self::Actor as Actor>::Context) -> E,
fn drop_err(self) -> DropErr<Self>
[src]
fn from_err<E>(self) -> FromErr<Self, E> where
E: From<Self::Error>,
[src]
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,
[src]
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,
[src]
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>
[src]
impl<S> ActorFuture for StreamFinish<S> where
S: ActorStream,
[src]
S: ActorStream,
type Item = ()
type Error = <S as ActorStream>::Error
type Actor = <S as ActorStream>::Actor
fn poll(
&mut self,
act: &mut <S as ActorStream>::Actor,
ctx: &mut <<S as ActorStream>::Actor as Actor>::Context
) -> Result<Async<()>, <S as ActorStream>::Error>
[src]
&mut self,
act: &mut <S as ActorStream>::Actor,
ctx: &mut <<S as ActorStream>::Actor as Actor>::Context
) -> Result<Async<()>, <S as ActorStream>::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,
[src]
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,
[src]
F: FnOnce(Self::Error, &mut Self::Actor, &mut <Self::Actor as Actor>::Context) -> E,
fn drop_err(self) -> DropErr<Self>
[src]
fn from_err<E>(self) -> FromErr<Self, E> where
E: From<Self::Error>,
[src]
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,
[src]
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,
[src]
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>
[src]
impl<S, F, Fut, T> ActorFuture for StreamFold<S, F, Fut, T> where
F: FnMut(T, <S as ActorStream>::Item, &mut <S as ActorStream>::Actor, &mut <<S as ActorStream>::Actor as Actor>::Context) -> Fut,
Fut: IntoActorFuture<Item = T, Actor = <S as ActorStream>::Actor>,
S: ActorStream,
<S as ActorStream>::Error: From<<Fut as IntoActorFuture>::Error>,
[src]
F: FnMut(T, <S as ActorStream>::Item, &mut <S as ActorStream>::Actor, &mut <<S as ActorStream>::Actor as Actor>::Context) -> Fut,
Fut: IntoActorFuture<Item = T, Actor = <S as ActorStream>::Actor>,
S: ActorStream,
<S as ActorStream>::Error: From<<Fut as IntoActorFuture>::Error>,
type Item = T
type Error = <S as ActorStream>::Error
type Actor = <S as ActorStream>::Actor
fn poll(
&mut self,
act: &mut <S as ActorStream>::Actor,
ctx: &mut <<S as ActorStream>::Actor as Actor>::Context
) -> Result<Async<T>, <S as ActorStream>::Error>
[src]
&mut self,
act: &mut <S as ActorStream>::Actor,
ctx: &mut <<S as ActorStream>::Actor as Actor>::Context
) -> Result<Async<T>, <S as ActorStream>::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,
[src]
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,
[src]
F: FnOnce(Self::Error, &mut Self::Actor, &mut <Self::Actor as Actor>::Context) -> E,
fn drop_err(self) -> DropErr<Self>
[src]
fn from_err<E>(self) -> FromErr<Self, E> where
E: From<Self::Error>,
[src]
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,
[src]
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,
[src]
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>
[src]
impl<T, E, A> ActorFuture for FutureResult<T, E, A> where
A: Actor,
[src]
A: Actor,
type Item = T
type Error = E
type Actor = A
fn poll(
&mut self,
&mut <FutureResult<T, E, A> as ActorFuture>::Actor,
&mut <<FutureResult<T, E, A> as ActorFuture>::Actor as Actor>::Context
) -> Result<Async<T>, E>
[src]
&mut self,
&mut <FutureResult<T, E, A> as ActorFuture>::Actor,
&mut <<FutureResult<T, E, A> as ActorFuture>::Actor as Actor>::Context
) -> Result<Async<T>, E>
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,
[src]
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,
[src]
F: FnOnce(Self::Error, &mut Self::Actor, &mut <Self::Actor as Actor>::Context) -> E,
fn drop_err(self) -> DropErr<Self>
[src]
fn from_err<E>(self) -> FromErr<Self, E> where
E: From<Self::Error>,
[src]
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,
[src]
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,
[src]
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>
[src]
impl<U, A, F> ActorFuture for Map<A, F> where
A: ActorFuture,
F: FnOnce(<A as ActorFuture>::Item, &mut <A as ActorFuture>::Actor, &mut <<A as ActorFuture>::Actor as Actor>::Context) -> U,
[src]
A: ActorFuture,
F: FnOnce(<A as ActorFuture>::Item, &mut <A as ActorFuture>::Actor, &mut <<A as ActorFuture>::Actor as Actor>::Context) -> U,
type Item = U
type Error = <A as ActorFuture>::Error
type Actor = <A as ActorFuture>::Actor
fn poll(
&mut self,
act: &mut <Map<A, F> as ActorFuture>::Actor,
ctx: &mut <<A as ActorFuture>::Actor as Actor>::Context
) -> Result<Async<U>, <A as ActorFuture>::Error>
[src]
&mut self,
act: &mut <Map<A, F> as ActorFuture>::Actor,
ctx: &mut <<A as ActorFuture>::Actor as Actor>::Context
) -> Result<Async<U>, <A as ActorFuture>::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,
[src]
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,
[src]
F: FnOnce(Self::Error, &mut Self::Actor, &mut <Self::Actor as Actor>::Context) -> E,
fn drop_err(self) -> DropErr<Self>
[src]
fn from_err<E>(self) -> FromErr<Self, E> where
E: From<Self::Error>,
[src]
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,
[src]
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,
[src]
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>
[src]
impl<U, A, F> ActorFuture for MapErr<A, F> where
A: ActorFuture,
F: FnOnce(<A as ActorFuture>::Error, &mut <A as ActorFuture>::Actor, &mut <<A as ActorFuture>::Actor as Actor>::Context) -> U,
[src]
A: ActorFuture,
F: FnOnce(<A as ActorFuture>::Error, &mut <A as ActorFuture>::Actor, &mut <<A as ActorFuture>::Actor as Actor>::Context) -> U,
type Item = <A as ActorFuture>::Item
type Error = U
type Actor = <A as ActorFuture>::Actor
fn poll(
&mut self,
act: &mut <A as ActorFuture>::Actor,
ctx: &mut <<A as ActorFuture>::Actor as Actor>::Context
) -> Result<Async<<A as ActorFuture>::Item>, U>
[src]
&mut self,
act: &mut <A as ActorFuture>::Actor,
ctx: &mut <<A as ActorFuture>::Actor as Actor>::Context
) -> Result<Async<<A as ActorFuture>::Item>, U>
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,
[src]
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,
[src]
F: FnOnce(Self::Error, &mut Self::Actor, &mut <Self::Actor as Actor>::Context) -> E,
fn drop_err(self) -> DropErr<Self>
[src]
fn from_err<E>(self) -> FromErr<Self, E> where
E: From<Self::Error>,
[src]
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,
[src]
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,
[src]
B: IntoActorFuture<Error = Self::Error, Actor = Self::Actor>,
F: FnOnce(Self::Item, &mut Self::Actor, &mut <Self::Actor as Actor>::Context) -> B,