pub struct Filter<St, Fut, F>where
    St: Stream,{ /* private fields */ }Expand description
Stream for the filter method.
Implementations§
Source§impl<St, Fut, F> Filter<St, Fut, F>
 
impl<St, Fut, F> Filter<St, Fut, F>
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 Filter<St, Fut, F>>) -> Pin<&mut St>
 
pub fn get_pin_mut(self: Pin<&mut Filter<St, Fut, F>>) -> 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, Fut, F> FusedStream for Filter<St, Fut, F>
 
impl<St, Fut, F> FusedStream for Filter<St, Fut, F>
Source§fn is_terminated(&self) -> bool
 
fn is_terminated(&self) -> bool
true if the stream should no longer be polled.Source§impl<S, Fut, F, Item> Sink<Item> for Filter<S, Fut, F>
 
impl<S, Fut, F, Item> Sink<Item> for Filter<S, Fut, F>
Source§type Error = <S as Sink<Item>>::Error
 
type Error = <S as Sink<Item>>::Error
Source§fn poll_ready(
    self: Pin<&mut Filter<S, Fut, F>>,
    cx: &mut Context<'_>,
) -> Poll<Result<(), <Filter<S, Fut, F> as Sink<Item>>::Error>>
 
fn poll_ready( self: Pin<&mut Filter<S, Fut, F>>, cx: &mut Context<'_>, ) -> Poll<Result<(), <Filter<S, Fut, F> as Sink<Item>>::Error>>
Sink to receive a value. Read moreSource§fn start_send(
    self: Pin<&mut Filter<S, Fut, F>>,
    item: Item,
) -> Result<(), <Filter<S, Fut, F> as Sink<Item>>::Error>
 
fn start_send( self: Pin<&mut Filter<S, Fut, F>>, item: Item, ) -> Result<(), <Filter<S, Fut, F> as Sink<Item>>::Error>
poll_ready which returned Poll::Ready(Ok(())). Read moreSource§impl<St, Fut, F> Stream for Filter<St, Fut, F>
 
impl<St, Fut, F> Stream for Filter<St, Fut, F>
Source§fn poll_next(
    self: Pin<&mut Filter<St, Fut, F>>,
    cx: &mut Context<'_>,
) -> Poll<Option<<St as Stream>::Item>>
 
fn poll_next( self: Pin<&mut Filter<St, Fut, F>>, cx: &mut Context<'_>, ) -> Poll<Option<<St as Stream>::Item>>
None if the stream is exhausted. Read moreimpl<'__pin, St, Fut, F> Unpin for Filter<St, Fut, F>
Auto Trait Implementations§
impl<St, Fut, F> Freeze for Filter<St, Fut, F>
impl<St, Fut, F> RefUnwindSafe for Filter<St, Fut, F>
impl<St, Fut, F> Send for Filter<St, Fut, F>
impl<St, Fut, F> Sync for Filter<St, Fut, F>
impl<St, Fut, F> UnwindSafe for Filter<St, Fut, F>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Source§impl<T, Item> SinkExt<Item> for T
 
impl<T, Item> SinkExt<Item> for T
Source§fn with<U, Fut, F, E>(self, f: F) -> With<Self, Item, U, Fut, F>
 
fn with<U, Fut, F, E>(self, f: F) -> With<Self, Item, U, Fut, F>
Source§fn with_flat_map<U, St, F>(self, f: F) -> WithFlatMap<Self, Item, U, St, F>
 
fn with_flat_map<U, St, F>(self, f: F) -> WithFlatMap<Self, Item, U, St, F>
Source§fn sink_map_err<E, F>(self, f: F) -> SinkMapErr<Self, F>
 
fn sink_map_err<E, F>(self, f: F) -> SinkMapErr<Self, F>
Source§fn sink_err_into<E>(self) -> SinkErrInto<Self, Item, E>
 
fn sink_err_into<E>(self) -> SinkErrInto<Self, Item, E>
Into trait. Read moreSource§fn flush(&mut self) -> Flush<'_, Self, Item> ⓘwhere
    Self: Unpin,
 
fn flush(&mut self) -> Flush<'_, Self, Item> ⓘwhere
    Self: Unpin,
Source§fn send(&mut self, item: Item) -> Send<'_, Self, Item> ⓘwhere
    Self: Unpin,
 
fn send(&mut self, item: Item) -> Send<'_, Self, Item> ⓘwhere
    Self: Unpin,
Source§fn feed(&mut self, item: Item) -> Feed<'_, Self, Item> ⓘwhere
    Self: Unpin,
 
fn feed(&mut self, item: Item) -> Feed<'_, Self, Item> ⓘwhere
    Self: Unpin,
Source§fn send_all<'a, St>(&'a mut self, stream: &'a mut St) -> SendAll<'a, Self, St> ⓘ
 
fn send_all<'a, St>(&'a mut self, stream: &'a mut St) -> SendAll<'a, Self, St> ⓘ
Source§fn right_sink<Si1>(self) -> Either<Si1, Self> ⓘ
 
fn right_sink<Si1>(self) -> Either<Si1, Self> ⓘ
Source§fn poll_ready_unpin(
    &mut self,
    cx: &mut Context<'_>,
) -> Poll<Result<(), Self::Error>>where
    Self: Unpin,
 
fn poll_ready_unpin(
    &mut self,
    cx: &mut Context<'_>,
) -> Poll<Result<(), Self::Error>>where
    Self: Unpin,
Sink::poll_ready on Unpin
sink types.Source§fn start_send_unpin(&mut self, item: Item) -> Result<(), Self::Error>where
    Self: Unpin,
 
fn start_send_unpin(&mut self, item: Item) -> Result<(), Self::Error>where
    Self: Unpin,
Sink::start_send on Unpin
sink types.Source§impl<T> StreamExt for T
 
impl<T> StreamExt for T
Source§fn next(&mut self) -> Next<'_, Self> ⓘwhere
    Self: Unpin,
 
fn next(&mut self) -> Next<'_, Self> ⓘwhere
    Self: Unpin,
Source§fn into_future(self) -> StreamFuture<Self> ⓘ
 
fn into_future(self) -> StreamFuture<Self> ⓘ
Source§fn map<T, F>(self, f: F) -> Map<Self, F>
 
fn map<T, F>(self, f: F) -> Map<Self, F>
Source§fn enumerate(self) -> Enumerate<Self>where
    Self: Sized,
 
fn enumerate(self) -> Enumerate<Self>where
    Self: Sized,
Source§fn filter<Fut, F>(self, f: F) -> Filter<Self, Fut, F>
 
fn filter<Fut, F>(self, f: F) -> Filter<Self, Fut, F>
Source§fn filter_map<Fut, T, F>(self, f: F) -> FilterMap<Self, Fut, F>
 
fn filter_map<Fut, T, F>(self, f: F) -> FilterMap<Self, Fut, F>
Source§fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F>
 
fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F>
Source§fn collect<C>(self) -> Collect<Self, C> ⓘ
 
fn collect<C>(self) -> Collect<Self, C> ⓘ
Source§fn unzip<A, B, FromA, FromB>(self) -> Unzip<Self, FromA, FromB> ⓘ
 
fn unzip<A, B, FromA, FromB>(self) -> Unzip<Self, FromA, FromB> ⓘ
Source§fn concat(self) -> Concat<Self> ⓘ
 
fn concat(self) -> Concat<Self> ⓘ
Source§fn count(self) -> Count<Self> ⓘwhere
    Self: Sized,
 
fn count(self) -> Count<Self> ⓘwhere
    Self: Sized,
Source§fn fold<T, Fut, F>(self, init: T, f: F) -> Fold<Self, Fut, T, F> ⓘ
 
fn fold<T, Fut, F>(self, init: T, f: F) -> Fold<Self, Fut, T, F> ⓘ
Source§fn any<Fut, F>(self, f: F) -> Any<Self, Fut, F> ⓘ
 
fn any<Fut, F>(self, f: F) -> Any<Self, Fut, F> ⓘ
true if any element in stream satisfied a predicate. Read moreSource§fn all<Fut, F>(self, f: F) -> All<Self, Fut, F> ⓘ
 
fn all<Fut, F>(self, f: F) -> All<Self, Fut, F> ⓘ
true if all element in stream satisfied a predicate. Read moreSource§fn flatten(self) -> Flatten<Self>
 
fn flatten(self) -> Flatten<Self>
Source§fn scan<S, B, Fut, F>(self, initial_state: S, f: F) -> Scan<Self, S, Fut, F>
 
fn scan<S, B, Fut, F>(self, initial_state: S, f: F) -> Scan<Self, S, Fut, F>
StreamExt::fold that holds internal state
and produces a new stream. Read moreSource§fn skip_while<Fut, F>(self, f: F) -> SkipWhile<Self, Fut, F>
 
fn skip_while<Fut, F>(self, f: F) -> SkipWhile<Self, Fut, F>
true. Read moreSource§fn take_while<Fut, F>(self, f: F) -> TakeWhile<Self, Fut, F>
 
fn take_while<Fut, F>(self, f: F) -> TakeWhile<Self, Fut, F>
true. Read moreSource§fn take_until<Fut>(self, fut: Fut) -> TakeUntil<Self, Fut>
 
fn take_until<Fut>(self, fut: Fut) -> TakeUntil<Self, Fut>
Source§fn for_each<Fut, F>(self, f: F) -> ForEach<Self, Fut, F> ⓘ
 
fn for_each<Fut, F>(self, f: F) -> ForEach<Self, Fut, F> ⓘ
Source§fn take(self, n: usize) -> Take<Self>where
    Self: Sized,
 
fn take(self, n: usize) -> Take<Self>where
    Self: Sized,
n items of the underlying stream. Read moreSource§fn skip(self, n: usize) -> Skip<Self>where
    Self: Sized,
 
fn skip(self, n: usize) -> Skip<Self>where
    Self: Sized,
n items of the underlying stream. Read moreSource§fn zip<St>(self, other: St) -> Zip<Self, St>
 
fn zip<St>(self, other: St) -> Zip<Self, St>
Source§fn peekable(self) -> Peekable<Self>where
    Self: Sized,
 
fn peekable(self) -> Peekable<Self>where
    Self: Sized,
peek method. Read moreSource§fn forward<S>(self, sink: S) -> Forward<Self, S> ⓘ
 
fn forward<S>(self, sink: S) -> Forward<Self, S> ⓘ
Source§fn inspect<F>(self, f: F) -> Inspect<Self, F>
 
fn inspect<F>(self, f: F) -> Inspect<Self, F>
Source§fn left_stream<B>(self) -> Either<Self, B> ⓘ
 
fn left_stream<B>(self) -> Either<Self, B> ⓘ
Source§fn right_stream<B>(self) -> Either<B, Self> ⓘ
 
fn right_stream<B>(self) -> Either<B, Self> ⓘ
Source§fn poll_next_unpin(&mut self, cx: &mut Context<'_>) -> Poll<Option<Self::Item>>where
    Self: Unpin,
 
fn poll_next_unpin(&mut self, cx: &mut Context<'_>) -> Poll<Option<Self::Item>>where
    Self: Unpin,
Stream::poll_next on Unpin
stream types.Source§fn select_next_some(&mut self) -> SelectNextSome<'_, Self> ⓘwhere
    Self: Unpin + FusedStream,
 
fn select_next_some(&mut self) -> SelectNextSome<'_, Self> ⓘwhere
    Self: Unpin + FusedStream,
Source§impl<S> TryStreamExt for S
 
impl<S> TryStreamExt for S
Source§fn err_into<E>(self) -> ErrInto<Self, E>
 
fn err_into<E>(self) -> ErrInto<Self, E>
Source§fn map_ok<T, F>(self, f: F) -> MapOk<Self, F>
 
fn map_ok<T, F>(self, f: F) -> MapOk<Self, F>
Source§fn map_err<E, F>(self, f: F) -> MapErr<Self, F>
 
fn map_err<E, F>(self, f: F) -> MapErr<Self, F>
Source§fn and_then<Fut, F>(self, f: F) -> AndThen<Self, Fut, F>
 
fn and_then<Fut, F>(self, f: F) -> AndThen<Self, Fut, F>
f. Read moreSource§fn or_else<Fut, F>(self, f: F) -> OrElse<Self, Fut, F>
 
fn or_else<Fut, F>(self, f: F) -> OrElse<Self, Fut, F>
f. Read moreSource§fn inspect_ok<F>(self, f: F) -> InspectOk<Self, F>
 
fn inspect_ok<F>(self, f: F) -> InspectOk<Self, F>
Source§fn inspect_err<F>(self, f: F) -> InspectErr<Self, F>
 
fn inspect_err<F>(self, f: F) -> InspectErr<Self, F>
Source§fn into_stream(self) -> IntoStream<Self>where
    Self: Sized,
 
fn into_stream(self) -> IntoStream<Self>where
    Self: Sized,
Source§fn try_next(&mut self) -> TryNext<'_, Self> ⓘwhere
    Self: Unpin,
 
fn try_next(&mut self) -> TryNext<'_, Self> ⓘwhere
    Self: Unpin,
Source§fn try_for_each<Fut, F>(self, f: F) -> TryForEach<Self, Fut, F> ⓘ
 
fn try_for_each<Fut, F>(self, f: F) -> TryForEach<Self, Fut, F> ⓘ
Source§fn try_skip_while<Fut, F>(self, f: F) -> TrySkipWhile<Self, Fut, F>
 
fn try_skip_while<Fut, F>(self, f: F) -> TrySkipWhile<Self, Fut, F>
true. Read moreSource§fn try_take_while<Fut, F>(self, f: F) -> TryTakeWhile<Self, Fut, F>
 
fn try_take_while<Fut, F>(self, f: F) -> TryTakeWhile<Self, Fut, F>
true. Read moreSource§fn try_collect<C>(self) -> TryCollect<Self, C> ⓘ
 
fn try_collect<C>(self) -> TryCollect<Self, C> ⓘ
Source§fn try_filter<Fut, F>(self, f: F) -> TryFilter<Self, Fut, F>
 
fn try_filter<Fut, F>(self, f: F) -> TryFilter<Self, Fut, F>
Source§fn try_filter_map<Fut, F, T>(self, f: F) -> TryFilterMap<Self, Fut, F>
 
fn try_filter_map<Fut, F, T>(self, f: F) -> TryFilterMap<Self, Fut, F>
Source§fn try_flatten(self) -> TryFlatten<Self>
 
fn try_flatten(self) -> TryFlatten<Self>
Source§fn try_fold<T, Fut, F>(self, init: T, f: F) -> TryFold<Self, Fut, T, F> ⓘ
 
fn try_fold<T, Fut, F>(self, init: T, f: F) -> TryFold<Self, Fut, T, F> ⓘ
Source§fn try_concat(self) -> TryConcat<Self> ⓘ
 
fn try_concat(self) -> TryConcat<Self> ⓘ
Source§fn try_poll_next_unpin(
    &mut self,
    cx: &mut Context<'_>,
) -> Poll<Option<Result<Self::Ok, Self::Error>>>where
    Self: Unpin,
 
fn try_poll_next_unpin(
    &mut self,
    cx: &mut Context<'_>,
) -> Poll<Option<Result<Self::Ok, Self::Error>>>where
    Self: Unpin,
TryStream::try_poll_next on Unpin
stream types.Source§fn try_all<Fut, F>(self, f: F) -> TryAll<Self, Fut, F> ⓘ
 
fn try_all<Fut, F>(self, f: F) -> TryAll<Self, Fut, F> ⓘ
Err is encountered or if an Ok item is found
that does not satisfy the predicate. Read more