Struct actix::fut::StreamFold [−][src]
pub struct StreamFold<S, F, Fut, T> where
Fut: IntoActorFuture, { /* fields omitted */ }
Expand description
A future used to collect all the results of a stream into one generic type.
This future is returned by the ActorStream::fold
method.
Trait Implementations
impl<S, F, Fut, T> ActorFuture for StreamFold<S, F, Fut, T> where
S: ActorStream + Unpin,
F: FnMut(T, S::Item, &mut S::Actor, &mut <S::Actor as Actor>::Context) -> Fut,
Fut: IntoActorFuture<Output = T, Actor = S::Actor>,
Fut::Future: ActorFuture + Unpin,
impl<S, F, Fut, T> ActorFuture for StreamFold<S, F, Fut, T> where
S: ActorStream + Unpin,
F: FnMut(T, S::Item, &mut S::Actor, &mut <S::Actor as Actor>::Context) -> Fut,
Fut: IntoActorFuture<Output = T, Actor = S::Actor>,
Fut::Future: ActorFuture + Unpin,
fn poll(
self: Pin<&mut Self>,
act: &mut S::Actor,
ctx: &mut <S::Actor as Actor>::Context,
task: &mut Context<'_>
) -> Poll<T>
Map this future’s result to a different type, returning a new future of the resulting type. Read more
Chain on a computation for when a future finished, passing the result of
the future to the provided closure f
. Read more
impl<S: Debug, F: Debug, Fut: Debug, T: Debug> Debug for StreamFold<S, F, Fut, T> where
Fut: IntoActorFuture,
Fut::Future: Debug,
impl<S: Debug, F: Debug, Fut: Debug, T: Debug> Debug for StreamFold<S, F, Fut, T> where
Fut: IntoActorFuture,
Fut::Future: Debug,
impl<'pin, S, F, Fut, T> Unpin for StreamFold<S, F, Fut, T> where
Fut: IntoActorFuture,
__StreamFold<'pin, S, F, Fut, T>: Unpin,
Auto Trait Implementations
impl<S, F, Fut, T> RefUnwindSafe for StreamFold<S, F, Fut, T> where
F: RefUnwindSafe,
S: RefUnwindSafe,
T: RefUnwindSafe,
<Fut as IntoActorFuture>::Future: RefUnwindSafe,
impl<S, F, Fut, T> Send for StreamFold<S, F, Fut, T> where
F: Send,
S: Send,
T: Send,
<Fut as IntoActorFuture>::Future: Send,
impl<S, F, Fut, T> Sync for StreamFold<S, F, Fut, T> where
F: Sync,
S: Sync,
T: Sync,
<Fut as IntoActorFuture>::Future: Sync,
impl<S, F, Fut, T> UnwindSafe for StreamFold<S, F, Fut, T> where
F: UnwindSafe,
S: UnwindSafe,
T: UnwindSafe,
<Fut as IntoActorFuture>::Future: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
type Future = F
type Future = F
The future that this type can be converted into.
type Output = <F as ActorFuture>::Output
type Output = <F as ActorFuture>::Output
The item that the future may resolve with.
type Actor = <F as ActorFuture>::Actor
type Actor = <F as ActorFuture>::Actor
The actor within which this future runs
Consumes this object and produces a future.