Type Alias futures_util::stream::stream::flatten_unordered::FlattenUnordered
source · 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,
impl<St, Fc> FlattenUnorderedWithFlowController<St, Fc>where St: Stream, Fc: FlowController<St::Item, <St::Item as Stream>::Item>, St::Item: Stream + Unpin,
pub(crate) fn new( stream: St, limit: Option<usize> ) -> FlattenUnorderedWithFlowController<St, Fc>
sourcepub fn get_ref(&self) -> &St
pub fn get_ref(&self) -> &St
Acquires a reference to the underlying sink or stream that this combinator is pulling from.
sourcepub fn get_mut(&mut self) -> &mut St
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.
sourcepub fn get_pin_mut(self: Pin<&mut Self>) -> Pin<&mut St>
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.
sourcepub fn into_inner(self) -> St
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,
impl<St, Fc> Debug for FlattenUnorderedWithFlowController<St, Fc>where St: Stream + Debug, St::Item: Stream + Debug,
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,
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
fn is_terminated(&self) -> bool
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>,
impl<St, Item, Fc> Sink<Item> for FlattenUnorderedWithFlowController<St, Fc>where St: Stream + Sink<Item>,
source§fn poll_ready(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Result<(), Self::Error>>
fn poll_ready( self: Pin<&mut Self>, cx: &mut Context<'_> ) -> Poll<Result<(), Self::Error>>
Sink
to receive a value. Read moresource§fn start_send(self: Pin<&mut Self>, item: Item) -> Result<(), Self::Error>
fn start_send(self: Pin<&mut Self>, item: Item) -> Result<(), Self::Error>
poll_ready
which returned Poll::Ready(Ok(()))
. Read more