pub struct StepBy<S> { /* private fields */ }
Expand description
Stream for CompletionStreamExt::step_by
.
Trait Implementations§
Source§impl<S: CompletionStream> CompletionStream for StepBy<S>
impl<S: CompletionStream> CompletionStream for StepBy<S>
Source§type Item = <S as CompletionStream>::Item
type Item = <S as CompletionStream>::Item
Values yielded by the stream.
Source§unsafe fn poll_next(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll<Option<Self::Item>>
unsafe fn poll_next( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Option<Self::Item>>
Source§impl<S> Stream for StepBy<S>
impl<S> Stream for StepBy<S>
Source§type Item = <S as CompletionStream>::Item
type Item = <S as CompletionStream>::Item
Values yielded by the 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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> CompletionStreamExt for Twhere
T: CompletionStream + ?Sized,
impl<T> CompletionStreamExt for Twhere
T: CompletionStream + ?Sized,
Source§unsafe fn poll_next(&mut self, cx: &mut Context<'_>) -> Poll<Option<Self::Item>>where
Self: Unpin,
unsafe fn poll_next(&mut self, cx: &mut Context<'_>) -> Poll<Option<Self::Item>>where
Self: Unpin,
Source§fn must_complete(self) -> MustComplete<Self>where
Self: Sized,
fn must_complete(self) -> MustComplete<Self>where
Self: Sized,
Make sure that the stream will complete. Any requests to cancel the stream through
poll_cancel
will be ignored.Source§fn next(&mut self) -> Next<'_, Self> ⓘwhere
Self: Unpin,
fn next(&mut self) -> Next<'_, Self> ⓘwhere
Self: Unpin,
Get the next item in the stream. Read more
Source§fn count(self) -> Count<Self> ⓘwhere
Self: Sized,
fn count(self) -> Count<Self> ⓘwhere
Self: Sized,
Count the number of items in the stream. Read more
Source§fn nth(&mut self, n: usize) -> Nth<'_, Self> ⓘwhere
Self: Unpin,
fn nth(&mut self, n: usize) -> Nth<'_, Self> ⓘwhere
Self: Unpin,
Get the nth element in the 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,
Create a stream starting at the same point, but stepping by the given amount each
iteration. Read more
Source§fn chain<U: CompletionStream<Item = Self::Item>>(
self,
other: U,
) -> Chain<Self, U>where
Self: Sized,
fn chain<U: CompletionStream<Item = Self::Item>>(
self,
other: U,
) -> Chain<Self, U>where
Self: Sized,
Chain this stream with another. Read more
Source§fn map<T, F: FnMut(Self::Item) -> T>(self, f: F) -> Map<Self, F>where
Self: Sized,
fn map<T, F: FnMut(Self::Item) -> T>(self, f: F) -> Map<Self, F>where
Self: Sized,
Map this stream’s items with a closure. Read more
Source§fn then<F: FnMut(Self::Item) -> Fut, Fut: CompletionFuture>(
self,
f: F,
) -> Then<Self, F, Fut>where
Self: Sized,
fn then<F: FnMut(Self::Item) -> Fut, Fut: CompletionFuture>(
self,
f: F,
) -> Then<Self, F, Fut>where
Self: Sized,
Map this stream’s items with an asynchronous closure. Read more
Source§fn for_each<F: FnMut(Self::Item)>(self, f: F) -> ForEach<Self, F> ⓘwhere
Self: Sized,
fn for_each<F: FnMut(Self::Item)>(self, f: F) -> ForEach<Self, F> ⓘwhere
Self: Sized,
Call a closure on each item the stream. Read more
Source§fn filter<F>(self, f: F) -> Filter<Self, F>
fn filter<F>(self, f: F) -> Filter<Self, F>
Keep the values in the stream for which the predicate resolves to
true
. Read moreSource§fn filter_map<T, F>(self, f: F) -> FilterMap<Self, F>
fn filter_map<T, F>(self, f: F) -> FilterMap<Self, F>
Filter and map the items of the stream with a closure. Read more
Source§fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
Yield the current iteration count as well as the next value. Read more
Source§fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
Skip items while the predicate returns
true
. Read moreSource§fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
Take items while the predicate returns
true
. Read moreSource§fn skip(self, n: usize) -> Skip<Self>where
Self: Sized,
fn skip(self, n: usize) -> Skip<Self>where
Self: Sized,
Skip the first
n
items in the stream. Read moreSource§fn take(self, n: usize) -> Take<Self>where
Self: Sized,
fn take(self, n: usize) -> Take<Self>where
Self: Sized,
Takes the first
n
items of the stream. All other items will be ignored. Read moreSource§fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>
fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>
Map the stream, flattening nested structure. Read more
Source§fn inspect<F>(self, f: F) -> Inspect<Self, F>
fn inspect<F>(self, f: F) -> Inspect<Self, F>
Do something with each element in the stream, passing the value on. Read more
Source§fn collect<C: FromCompletionStream<Self::Item>>(self) -> Collect<Self, C> ⓘwhere
Self: Sized,
fn collect<C: FromCompletionStream<Self::Item>>(self) -> Collect<Self, C> ⓘwhere
Self: Sized,
Collect all the items in the stream into a collection. Read more
Source§fn fold<T, F>(self, init: T, f: F) -> Fold<Self, F, T> ⓘ
fn fold<T, F>(self, init: T, f: F) -> Fold<Self, F, T> ⓘ
Accumulate a value over a stream. Read more
Source§fn all<F: FnMut(Self::Item) -> bool>(&mut self, f: F) -> All<'_, Self, F> ⓘwhere
Self: Unpin,
fn all<F: FnMut(Self::Item) -> bool>(&mut self, f: F) -> All<'_, Self, F> ⓘwhere
Self: Unpin,
Check if all the elements in the stream match a predicate. Read more
Source§fn any<F: FnMut(Self::Item) -> bool>(&mut self, f: F) -> Any<'_, Self, F> ⓘwhere
Self: Unpin,
fn any<F: FnMut(Self::Item) -> bool>(&mut self, f: F) -> Any<'_, Self, F> ⓘwhere
Self: Unpin,
Check if any of the elements in the stream match a predicate. Read more
Source§fn find<P>(&mut self, predicate: P) -> Find<'_, Self, P> ⓘ
fn find<P>(&mut self, predicate: P) -> Find<'_, Self, P> ⓘ
Search for an element in the stream that satisfies a predicate. Read more
Source§fn position<P>(&mut self, predicate: P) -> Position<'_, Self, P> ⓘ
fn position<P>(&mut self, predicate: P) -> Position<'_, Self, P> ⓘ
Get the index of an element in the stream. Read more
Source§fn max_by<F>(self, compare: F) -> MaxBy<Self, F> ⓘ
fn max_by<F>(self, compare: F) -> MaxBy<Self, F> ⓘ
Find the maximum value in the stream using the specified comparison function. Read more
Source§fn max_by_key<B, F>(self, f: F) -> MaxByKey<Self, B, F> ⓘ
fn max_by_key<B, F>(self, f: F) -> MaxByKey<Self, B, F> ⓘ
Find the element that gives the maximum value from the specified function. Read more
Source§fn min_by<F>(self, compare: F) -> MinBy<Self, F> ⓘ
fn min_by<F>(self, compare: F) -> MinBy<Self, F> ⓘ
Find the minimum value in the stream using the specified comparison function. Read more
Source§fn min_by_key<B, F>(self, f: F) -> MinByKey<Self, B, F> ⓘ
fn min_by_key<B, F>(self, f: F) -> MinByKey<Self, B, F> ⓘ
Find the element that gives the minimum value from the specified function. Read more
Source§fn copied<'a, T: Copy + 'a>(self) -> Copied<Self>
fn copied<'a, T: Copy + 'a>(self) -> Copied<Self>
Copy all of the elements in the stream. Read more
Source§fn cloned<'a, T: Clone + 'a>(self) -> Cloned<Self>
fn cloned<'a, T: Clone + 'a>(self) -> Cloned<Self>
Clone all of the elements in the stream. Read more
Source§fn boxed<'a>(self) -> BoxCompletionStream<'a, Self::Item>
fn boxed<'a>(self) -> BoxCompletionStream<'a, Self::Item>
Available on crate feature
alloc
only.Box the stream, erasing its type. Read more
Source§fn boxed_local<'a>(self) -> LocalBoxCompletionStream<'a, Self::Item>where
Self: Sized + 'a,
fn boxed_local<'a>(self) -> LocalBoxCompletionStream<'a, Self::Item>where
Self: Sized + 'a,
Available on crate feature
alloc
only.Box the stream locally, erasing its type. Read more
Source§impl<T> StreamExt for Twhere
T: Stream,
impl<T> StreamExt for Twhere
T: Stream,
Source§fn into_completion(self) -> Adapter<Self> ⓘ
fn into_completion(self) -> Adapter<Self> ⓘ
Convert this stream into a
CompletionStream
. Read more