pub struct StepBy<S> { /* private fields */ }
Expand description
Trait ImplementationsΒ§
SourceΒ§impl<S> Stream for StepBy<S>where
S: Stream,
impl<S> Stream for StepBy<S>where
S: Stream,
impl<'__pin, S> Unpin for StepBy<S>where
PinnedFieldsOf<__Origin<'__pin, S>>: Unpin,
Auto Trait ImplementationsΒ§
impl<S> Freeze for StepBy<S>where
S: Freeze,
impl<S> RefUnwindSafe for StepBy<S>where
S: RefUnwindSafe,
impl<S> Send for StepBy<S>where
S: Send,
impl<S> Sync for StepBy<S>where
S: Sync,
impl<S> UnwindSafe for StepBy<S>where
S: UnwindSafe,
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
Mutably borrows from an owned value. Read more
SourceΒ§impl<I> IntoStream for Iwhere
I: Stream,
impl<I> IntoStream for Iwhere
I: Stream,
SourceΒ§impl<S> StreamExt for S
impl<S> StreamExt for S
SourceΒ§fn next(&mut self) -> NextFuture<'_, Self> βwhere
Self: Unpin,
fn next(&mut self) -> NextFuture<'_, Self> βwhere
Self: Unpin,
Retrieves the next item in the stream. Read more
SourceΒ§fn try_next<T, E>(&mut self) -> TryNextFuture<'_, Self> β
fn try_next<T, E>(&mut self) -> TryNextFuture<'_, Self> β
Retrieves the next item in the stream. Read more
SourceΒ§fn count(self) -> CountFuture<Self> βwhere
Self: Sized,
fn count(self) -> CountFuture<Self> βwhere
Self: Sized,
Counts the number of items in the stream. Read more
SourceΒ§fn map<T, F>(self, f: F) -> Map<Self, F>
fn map<T, F>(self, f: F) -> Map<Self, F>
Maps items of the stream to new values using a closure. Read more
SourceΒ§fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>
fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>
Maps items to streams and then concatenates them. Read more
SourceΒ§fn then<F, Fut>(self, f: F) -> Then<Self, F, Fut>
fn then<F, Fut>(self, f: F) -> Then<Self, F, Fut>
Maps items of the stream to new values using an async closure. Read more
SourceΒ§fn filter_map<T, F>(self, f: F) -> FilterMap<Self, F>
fn filter_map<T, F>(self, f: F) -> FilterMap<Self, F>
Filters and maps items of the stream using a closure. Read more
SourceΒ§fn take(self, n: usize) -> Take<Self>where
Self: Sized,
fn take(self, n: usize) -> Take<Self>where
Self: Sized,
Takes only the first
n
items of the stream. Read moreSourceΒ§fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
SourceΒ§fn skip(self, n: usize) -> Skip<Self>where
Self: Sized,
fn skip(self, n: usize) -> Skip<Self>where
Self: Sized,
Skips the first
n
items of the stream. Read moreSourceΒ§fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
SourceΒ§fn step_by(self, step: usize) -> StepBy<Self>where
Self: Sized,
fn step_by(self, step: usize) -> StepBy<Self>where
Self: Sized,
Yields every
step
th item. Read moreSourceΒ§fn chain<U>(self, other: U) -> Chain<Self, U>
fn chain<U>(self, other: U) -> Chain<Self, U>
Appends another stream to the end of this one. Read more
SourceΒ§fn collect<C>(self) -> CollectFuture<Self, C> β
fn collect<C>(self) -> CollectFuture<Self, C> β
Collects all items in the stream into a collection. Read more
SourceΒ§fn try_collect<T, E, C>(self) -> TryCollectFuture<Self, C> β
fn try_collect<T, E, C>(self) -> TryCollectFuture<Self, C> β
Collects all items in the fallible stream into a collection. Read more
SourceΒ§fn partition<B, P>(self, predicate: P) -> PartitionFuture<Self, P, B> β
fn partition<B, P>(self, predicate: P) -> PartitionFuture<Self, P, B> β
Partitions items into those for which
predicate
is true
and those for which it is
false
, and then collects them into two collections. Read moreSourceΒ§fn fold<T, F>(self, init: T, f: F) -> FoldFuture<Self, F, T> β
fn fold<T, F>(self, init: T, f: F) -> FoldFuture<Self, F, T> β
Accumulates a computation over the stream. Read more
SourceΒ§fn try_fold<T, E, F, B>(
&mut self,
init: B,
f: F,
) -> TryFoldFuture<'_, Self, F, B> β
fn try_fold<T, E, F, B>( &mut self, init: B, f: F, ) -> TryFoldFuture<'_, Self, F, B> β
Accumulates a fallible computation over the stream. Read more
SourceΒ§fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F>
fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F>
Maps items of the stream to new values using a state value and a closure. Read more
SourceΒ§fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
Enumerates items, mapping them to
(index, item)
. Read moreSourceΒ§fn inspect<F>(self, f: F) -> Inspect<Self, F>
fn inspect<F>(self, f: F) -> Inspect<Self, F>
Calls a closure on each item and passes it on. Read more
SourceΒ§fn nth(&mut self, n: usize) -> NthFuture<'_, Self> βwhere
Self: Unpin,
fn nth(&mut self, n: usize) -> NthFuture<'_, Self> βwhere
Self: Unpin,
Gets the
n
th item of the stream. Read moreSourceΒ§fn last(self) -> LastFuture<Self> βwhere
Self: Sized,
fn last(self) -> LastFuture<Self> βwhere
Self: Sized,
Returns the last item in the stream. Read more
SourceΒ§fn find<P>(&mut self, predicate: P) -> FindFuture<'_, Self, P> β
fn find<P>(&mut self, predicate: P) -> FindFuture<'_, Self, P> β
SourceΒ§fn find_map<F, B>(&mut self, f: F) -> FindMapFuture<'_, Self, F> β
fn find_map<F, B>(&mut self, f: F) -> FindMapFuture<'_, Self, F> β
SourceΒ§fn position<P>(&mut self, predicate: P) -> PositionFuture<'_, Self, P> β
fn position<P>(&mut self, predicate: P) -> PositionFuture<'_, Self, P> β
SourceΒ§fn for_each<F>(self, f: F) -> ForEachFuture<Self, F> β
fn for_each<F>(self, f: F) -> ForEachFuture<Self, F> β
Calls a closure on each item of the stream. Read more
SourceΒ§fn try_for_each<F, E>(&mut self, f: F) -> TryForEachFuture<'_, Self, F> β
fn try_for_each<F, E>(&mut self, f: F) -> TryForEachFuture<'_, Self, F> β
Calls a fallible closure on each item of the stream, stopping on first error. Read more
SourceΒ§fn zip<U>(self, other: U) -> Zip<Self, U>
fn zip<U>(self, other: U) -> Zip<Self, U>
Zips up two streams into a single stream of pairs. Read more
SourceΒ§fn unzip<A, B, FromA, FromB>(self) -> UnzipFuture<Self, FromA, FromB> β
fn unzip<A, B, FromA, FromB>(self) -> UnzipFuture<Self, FromA, FromB> β
Collects a stream of pairs into a pair of collections. Read more
SourceΒ§fn race<S>(self, other: S) -> Race<Self, S>
fn race<S>(self, other: S) -> Race<Self, S>
Merges with
other
stream, with no preference for either stream when both are ready. Read moreSourceΒ§fn drain(&mut self) -> Drain<'_, Self>
fn drain(&mut self) -> Drain<'_, Self>
Yields all immediately available values from a stream. Read more
SourceΒ§impl<T> StreamExt for T
impl<T> StreamExt for T
SourceΒ§fn next(&mut self) -> NextFuture<'_, Self>where
Self: Unpin,
fn next(&mut self) -> NextFuture<'_, Self>where
Self: Unpin,
Advances the stream and returns the next value. Read more
SourceΒ§fn take(self, n: usize) -> Take<Self>where
Self: Sized,
fn take(self, n: usize) -> Take<Self>where
Self: Sized,
Creates a stream that yields its first
n
elements. Read moreSourceΒ§fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
Creates a stream that yields elements based on a predicate. Read more
SourceΒ§fn throttle(self, d: Duration) -> Throttle<Self>where
Self: Sized,
fn throttle(self, d: Duration) -> Throttle<Self>where
Self: Sized,
Available on
unstable
only.Limit the amount of items yielded per timeslice in a stream. Read more
SourceΒ§fn step_by(self, step: usize) -> StepBy<Self>where
Self: Sized,
fn step_by(self, step: usize) -> StepBy<Self>where
Self: Sized,
Creates a stream that yields each
step
th element. Read moreSourceΒ§fn chain<U>(self, other: U) -> Chain<Self, U>
fn chain<U>(self, other: U) -> Chain<Self, U>
Takes two streams and creates a new stream over both in sequence. Read more
SourceΒ§fn cloned<'a, T>(self) -> Cloned<Self>
fn cloned<'a, T>(self) -> Cloned<Self>
Creates an stream which copies all of its elements. Read more
SourceΒ§fn copied<'a, T>(self) -> Copied<Self>
fn copied<'a, T>(self) -> Copied<Self>
Creates an stream which copies all of its elements. Read more
SourceΒ§fn cycle(self) -> Cycle<Self>
fn cycle(self) -> Cycle<Self>
Creates a stream that yields the provided values infinitely and in order. Read more
SourceΒ§fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
Creates a stream that gives the current elementβs count as well as the next value. Read more
SourceΒ§fn delay(self, dur: Duration) -> Delay<Self>where
Self: Sized,
fn delay(self, dur: Duration) -> Delay<Self>where
Self: Sized,
Available on
unstable
only.Creates a stream that is delayed before it starts yielding items. Read more
SourceΒ§fn map<B, F>(self, f: F) -> Map<Self, F>
fn map<B, F>(self, f: F) -> Map<Self, F>
Takes a closure and creates a stream that calls that closure on every element of this stream. Read more
SourceΒ§fn inspect<F>(self, f: F) -> Inspect<Self, F>
fn inspect<F>(self, f: F) -> Inspect<Self, F>
A combinator that does something with each element in the stream, passing the value
on. Read more
SourceΒ§fn last(self) -> LastFuture<Self, Self::Item>where
Self: Sized,
fn last(self) -> LastFuture<Self, Self::Item>where
Self: Sized,
Returns the last element of the stream. Read more
SourceΒ§fn fuse(self) -> Fuse<Self>where
Self: Sized,
fn fuse(self) -> Fuse<Self>where
Self: Sized,
Creates a stream which ends after the first
None
. Read moreSourceΒ§fn filter<P>(self, predicate: P) -> Filter<Self, P>
fn filter<P>(self, predicate: P) -> Filter<Self, P>
Creates a stream that uses a predicate to determine if an element should be yielded. Read more
SourceΒ§fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>
fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>
Available on
unstable
only.Creates an stream that works like map, but flattens nested structure. Read more
SourceΒ§fn flatten(self) -> Flatten<Self>
fn flatten(self) -> Flatten<Self>
Available on
unstable
only.Creates an stream that flattens nested structure. Read more
SourceΒ§fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>
fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>
Both filters and maps a stream. Read more
SourceΒ§fn min_by_key<B, F>(self, key_by: F) -> MinByKeyFuture<Self, Self::Item, F>
fn min_by_key<B, F>(self, key_by: F) -> MinByKeyFuture<Self, Self::Item, F>
Returns the element that gives the minimum value with respect to the
specified key function. If several elements are equally minimum,
the first element is returned. If the stream is empty,
None
is returned. Read moreSourceΒ§fn max_by_key<B, F>(self, key_by: F) -> MaxByKeyFuture<Self, Self::Item, F>
fn max_by_key<B, F>(self, key_by: F) -> MaxByKeyFuture<Self, Self::Item, F>
Returns the element that gives the maximum value with respect to the
specified key function. If several elements are equally maximum,
the first element is returned. If the stream is empty,
None
is returned. Read moreSourceΒ§fn min_by<F>(self, compare: F) -> MinByFuture<Self, F, Self::Item>
fn min_by<F>(self, compare: F) -> MinByFuture<Self, F, Self::Item>
Returns the element that gives the minimum value with respect to the
specified comparison function. If several elements are equally minimum,
the first element is returned. If the stream is empty,
None
is returned. Read moreSourceΒ§fn max(self) -> MaxFuture<Self, Self::Item>
fn max(self) -> MaxFuture<Self, Self::Item>
Returns the element that gives the maximum value. If several elements are equally maximum,
the first element is returned. If the stream is empty,
None
is returned. Read moreSourceΒ§fn min(self) -> MinFuture<Self, Self::Item>
fn min(self) -> MinFuture<Self, Self::Item>
Returns the element that gives the minimum value. If several elements are equally minimum,
the first element is returned. If the stream is empty,
None
is returned. Read moreSourceΒ§fn max_by<F>(self, compare: F) -> MaxByFuture<Self, F, Self::Item>
fn max_by<F>(self, compare: F) -> MaxByFuture<Self, F, Self::Item>
Returns the element that gives the maximum value with respect to the
specified comparison function. If several elements are equally maximum,
the first element is returned. If the stream is empty,
None
is returned. Read moreSourceΒ§fn nth(&mut self, n: usize) -> NthFuture<'_, Self>
fn nth(&mut self, n: usize) -> NthFuture<'_, Self>
Returns the nth element of the stream. Read more
SourceΒ§fn all<F>(&mut self, f: F) -> AllFuture<'_, Self, F, Self::Item>
fn all<F>(&mut self, f: F) -> AllFuture<'_, Self, F, Self::Item>
Tests if every element of the stream matches a predicate. Read more
SourceΒ§fn find<P>(&mut self, p: P) -> FindFuture<'_, Self, P>
fn find<P>(&mut self, p: P) -> FindFuture<'_, Self, P>
Searches for an element in a stream that satisfies a predicate. Read more
SourceΒ§fn find_map<F, B>(&mut self, f: F) -> FindMapFuture<'_, Self, F>
fn find_map<F, B>(&mut self, f: F) -> FindMapFuture<'_, Self, F>
Applies function to the elements of stream and returns the first non-none result. Read more
SourceΒ§fn fold<B, F>(self, init: B, f: F) -> FoldFuture<Self, F, B>
fn fold<B, F>(self, init: B, f: F) -> FoldFuture<Self, F, B>
A combinator that applies a function to every element in a stream
producing a single, final value. Read more
SourceΒ§fn partition<B, F>(self, f: F) -> PartitionFuture<Self, F, B>
fn partition<B, F>(self, f: F) -> PartitionFuture<Self, F, B>
Available on
unstable
only.A combinator that applies a function to every element in a stream
creating two collections from it. Read more
SourceΒ§fn for_each<F>(self, f: F) -> ForEachFuture<Self, F>
fn for_each<F>(self, f: F) -> ForEachFuture<Self, F>
Call a closure on each element of the stream. Read more
SourceΒ§fn any<F>(&mut self, f: F) -> AnyFuture<'_, Self, F, Self::Item>
fn any<F>(&mut self, f: F) -> AnyFuture<'_, Self, F, Self::Item>
Tests if any element of the stream matches a predicate. Read more
SourceΒ§fn by_ref(&mut self) -> &mut Self
fn by_ref(&mut self) -> &mut Self
Available on
unstable
only.Borrows an stream, rather than consuming it. Read more
SourceΒ§fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
Combinator that
skip
s elements based on a predicate. Read moreSourceΒ§fn skip(self, n: usize) -> Skip<Self>where
Self: Sized,
fn skip(self, n: usize) -> Skip<Self>where
Self: Sized,
Creates a combinator that skips the first
n
elements. Read moreSourceΒ§fn timeout(self, dur: Duration) -> Timeout<Self>
fn timeout(self, dur: Duration) -> Timeout<Self>
Available on
unstable
only.Await a stream or times out after a duration of time. Read more
SourceΒ§fn try_fold<B, F, T, E>(
&mut self,
init: T,
f: F,
) -> TryFoldFuture<'_, Self, F, T>
fn try_fold<B, F, T, E>( &mut self, init: T, f: F, ) -> TryFoldFuture<'_, Self, F, T>
A combinator that applies a function as long as it returns successfully, producing a single, final value.
Immediately returns the error when the function returns unsuccessfully. Read more
SourceΒ§fn try_for_each<F, E>(&mut self, f: F) -> TryForEachFuture<'_, Self, F>
fn try_for_each<F, E>(&mut self, f: F) -> TryForEachFuture<'_, Self, F>
Applies a falliable function to each element in a stream, stopping at first error and returning it. Read more
SourceΒ§fn zip<U>(self, other: U) -> Zip<Self, U>
fn zip<U>(self, other: U) -> Zip<Self, U>
βZips upβ two streams into a single stream of pairs. Read more
SourceΒ§fn unzip<A, B, FromA, FromB>(self) -> UnzipFuture<Self, FromA, FromB>
fn unzip<A, B, FromA, FromB>(self) -> UnzipFuture<Self, FromA, FromB>
Available on
unstable
only.Converts an stream of pairs into a pair of containers. Read more
SourceΒ§fn collect<'a, B>(self) -> Pin<Box<dyn Future<Output = B> + Send + 'a>>
fn collect<'a, B>(self) -> Pin<Box<dyn Future<Output = B> + Send + 'a>>
Available on
unstable
only.Transforms a stream into a collection. Read more
SourceΒ§fn merge<U>(self, other: U) -> Merge<Self, U>
fn merge<U>(self, other: U) -> Merge<Self, U>
Available on
unstable
only.Combines multiple streams into a single stream of all their outputs. Read more
SourceΒ§fn partial_cmp<S>(self, other: S) -> PartialCmpFuture<Self, S>
fn partial_cmp<S>(self, other: S) -> PartialCmpFuture<Self, S>
Lexicographically compares the elements of this
Stream
with those
of another. Read moreSourceΒ§fn position<P>(&mut self, predicate: P) -> PositionFuture<'_, Self, P>
fn position<P>(&mut self, predicate: P) -> PositionFuture<'_, Self, P>
Searches for an element in a Stream that satisfies a predicate, returning
its index. Read more
SourceΒ§fn cmp<S>(self, other: S) -> CmpFuture<Self, S>
fn cmp<S>(self, other: S) -> CmpFuture<Self, S>
Lexicographically compares the elements of this
Stream
with those
of another using βOrdβ. Read moreSourceΒ§fn count(self) -> CountFuture<Self>where
Self: Sized,
fn count(self) -> CountFuture<Self>where
Self: Sized,
Available on
unstable
only.Counts the number of elements in the stream. Read more
SourceΒ§fn ne<S>(self, other: S) -> NeFuture<Self, S>
fn ne<S>(self, other: S) -> NeFuture<Self, S>
Determines if the elements of this
Stream
are lexicographically
not equal to those of another. Read moreSourceΒ§fn ge<S>(self, other: S) -> GeFuture<Self, S>
fn ge<S>(self, other: S) -> GeFuture<Self, S>
Determines if the elements of this
Stream
are lexicographically
greater than or equal to those of another. Read moreSourceΒ§fn eq<S>(self, other: S) -> EqFuture<Self, S>
fn eq<S>(self, other: S) -> EqFuture<Self, S>
Determines if the elements of this
Stream
are lexicographically
equal to those of another. Read moreSourceΒ§fn gt<S>(self, other: S) -> GtFuture<Self, S>
fn gt<S>(self, other: S) -> GtFuture<Self, S>
Determines if the elements of this
Stream
are lexicographically
greater than those of another. Read moreSourceΒ§fn le<S>(self, other: S) -> LeFuture<Self, S>
fn le<S>(self, other: S) -> LeFuture<Self, S>
Determines if the elements of this
Stream
are lexicographically
less or equal to those of another. Read moreSourceΒ§fn lt<S>(self, other: S) -> LtFuture<Self, S>
fn lt<S>(self, other: S) -> LtFuture<Self, S>
Determines if the elements of this
Stream
are lexicographically
less than those of another. Read more