pub type FlattenUnordered<St> = FlattenUnorderedWithFlowController<St, ()>;
Expand description

Stream for the flatten_unordered method.

Aliased Type§

struct FlattenUnordered<St> {
    inner_streams: FuturesUnordered<PollStreamFut<<St as Stream>::Item>>,
    stream: St,
    poll_state: SharedPollState,
    limit: Option<NonZeroUsize>,
    is_stream_done: bool,
    inner_streams_waker: Arc<WrappedWaker, Global>,
    stream_waker: Arc<WrappedWaker, Global>,
    flow_controller: PhantomData<()>,
}

Fields§

§inner_streams: FuturesUnordered<PollStreamFut<<St as Stream>::Item>>§stream: St§poll_state: SharedPollState§limit: Option<NonZeroUsize>§is_stream_done: bool§inner_streams_waker: Arc<WrappedWaker, Global>§stream_waker: Arc<WrappedWaker, Global>§flow_controller: PhantomData<()>

Implementations§

source§

impl<St, Fc> FlattenUnorderedWithFlowController<St, Fc>where St: Stream, Fc: FlowController<St::Item, <St::Item as Stream>::Item>, St::Item: Stream + Unpin,

source

pub(crate) fn new( stream: St, limit: Option<usize> ) -> FlattenUnorderedWithFlowController<St, Fc>

source

pub fn get_ref(&self) -> &St

Acquires a reference to the underlying sink or stream that this combinator is pulling from.

source

pub fn get_mut(&mut self) -> &mut St

Acquires a mutable reference to the underlying sink or stream that this combinator is pulling from.

Note that care must be taken to avoid tampering with the state of the sink or stream which may otherwise confuse this combinator.

source

pub fn get_pin_mut(self: Pin<&mut Self>) -> Pin<&mut St>

Acquires a pinned mutable reference to the underlying sink or stream that this combinator is pulling from.

Note that care must be taken to avoid tampering with the state of the sink or stream which may otherwise confuse this combinator.

source

pub fn into_inner(self) -> St

Consumes this combinator, returning the underlying sink or stream.

Note that this may discard intermediate state of this combinator, so care should be taken to avoid losing resources when this is called.

Trait Implementations§

source§

impl<St, Fc> Debug for FlattenUnorderedWithFlowController<St, Fc>where St: Stream + Debug, St::Item: Stream + Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<St, Fc> FusedStream for FlattenUnorderedWithFlowController<St, Fc>where St: FusedStream, Fc: FlowController<St::Item, <St::Item as Stream>::Item>, St::Item: Stream + Unpin,

source§

fn is_terminated(&self) -> bool

Returns true if the stream should no longer be polled.
source§

impl<St, Item, Fc> Sink<Item> for FlattenUnorderedWithFlowController<St, Fc>where St: Stream + Sink<Item>,

§

type Error = <St as Sink<Item>>::Error

The type of value produced by the sink when an error occurs.
source§

fn poll_ready( self: Pin<&mut Self>, cx: &mut Context<'_> ) -> Poll<Result<(), Self::Error>>

Attempts to prepare the Sink to receive a value. Read more
source§

fn start_send(self: Pin<&mut Self>, item: Item) -> Result<(), Self::Error>

Begin the process of sending a value to the sink. Each call to this function must be preceded by a successful call to poll_ready which returned Poll::Ready(Ok(())). Read more
source§

fn poll_flush( self: Pin<&mut Self>, cx: &mut Context<'_> ) -> Poll<Result<(), Self::Error>>

Flush any remaining output from this sink. Read more
source§

fn poll_close( self: Pin<&mut Self>, cx: &mut Context<'_> ) -> Poll<Result<(), Self::Error>>

Flush any remaining output and close this sink, if necessary. Read more
source§

impl<St, Fc> Stream for FlattenUnorderedWithFlowController<St, Fc>where St: Stream, Fc: FlowController<St::Item, <St::Item as Stream>::Item>, St::Item: Stream + Unpin,

§

type Item = <<St as Stream>::Item as Stream>::Item

Values yielded by the stream.
source§

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

Attempt to pull out the next value of this stream, registering the current task for wakeup if the value is not yet available, and returning None if the stream is exhausted. Read more
source§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the stream. Read more
source§

impl<'__pin, St, Fc> Unpin for FlattenUnorderedWithFlowController<St, Fc>where __Origin<'__pin, St, Fc>: Unpin, St: Stream,