Trait actix::fut::stream::ActorStream

source ·
pub trait ActorStream<A: Actor> {
    type Item;

    // Required method
    fn poll_next(
        self: Pin<&mut Self>,
        srv: &mut A,
        ctx: &mut A::Context,
        task: &mut Context<'_>
    ) -> Poll<Option<Self::Item>>;
}
Expand description

A stream of values, not all of which may have been produced yet.

This is similar to futures_util::stream::Stream trait, except it works with Actor

Required Associated Types§

source

type Item

The type of item this stream will yield on success.

Required Methods§

source

fn poll_next( self: Pin<&mut Self>, srv: &mut A, ctx: &mut A::Context, task: &mut Context<'_> ) -> Poll<Option<Self::Item>>

Implementors§

source§

impl<A: Actor> ActorStream<A> for IntervalFunc<A>

§

type Item = ()

source§

impl<S, A> ActorStream<A> for StreamWrap<S, A>
where S: Stream, A: Actor,

§

type Item = <S as Stream>::Item

source§

impl<S, A> ActorStream<A> for Timeout<S>
where S: ActorStream<A>, A: Actor,

§

type Item = Result<<S as ActorStream<A>>::Item, ()>

source§

impl<S, A, F, Fut> ActorStream<A> for SkipWhile<S, S::Item, F, Fut>
where S: ActorStream<A>, A: Actor, F: FnMut(&S::Item, &mut A, &mut A::Context) -> Fut, Fut: ActorFuture<A, Output = bool>,

§

type Item = <S as ActorStream<A>>::Item

source§

impl<S, A, F, Fut> ActorStream<A> for TakeWhile<S, S::Item, F, Fut>
where S: ActorStream<A>, A: Actor, F: FnMut(&S::Item, &mut A, &mut A::Context) -> Fut, Fut: ActorFuture<A, Output = bool>,

§

type Item = <S as ActorStream<A>>::Item

source§

impl<S, A, F, Fut> ActorStream<A> for Then<S, F, Fut>
where S: ActorStream<A>, A: Actor, F: FnMut(S::Item, &mut A, &mut A::Context) -> Fut, Fut: ActorFuture<A>,

§

type Item = <Fut as ActorFuture<A>>::Output

source§

impl<S, A, F, U> ActorStream<A> for Map<S, F>
where S: ActorStream<A>, A: Actor, F: FnMut(S::Item, &mut A, &mut A::Context) -> U,

§

type Item = U