pub struct Rev<I> { /* private fields */ }Expand description
Reverse adapter with logical-order reversal semantics.
Trait Implementations§
Source§impl<I> ParallelIterator for Rev<I>
impl<I> ParallelIterator for Rev<I>
Source§fn drive<C, R>(self, consumer: C) -> R
fn drive<C, R>(self, consumer: C) -> R
§Why this stays sequential
Reversal needs both each shard’s own stream reversed and the shard order
flipped, but Consumer::combine(left, right) fixes the merge order as
logically-earlier-first. Expressing this needs an order-reversing
consumer wrapper whose base combine is inverted, which is a protocol
change rather than an adapter push.
Source§type Item = <I as ParallelIterator>::Item
type Item = <I as ParallelIterator>::Item
The type of items yielded by this parallel iterator.
Source§fn seq_items(self) -> Vec<Self::Item>
fn seq_items(self) -> Vec<Self::Item>
Collect all items sequentially without routing through the consumer protocol.
Source§fn seq_items_window(self, skip: usize, take: Option<usize>) -> Vec<Self::Item>
fn seq_items_window(self, skip: usize, take: Option<usize>) -> Vec<Self::Item>
Collect a logical window from the sequential item stream.
Source§fn seq_items_reversed(self) -> Vec<Self::Item>
fn seq_items_reversed(self) -> Vec<Self::Item>
Collect items in reverse logical order.
Source§fn seq_items_reversed_prefix(self, count: usize) -> Vec<Self::Item>
fn seq_items_reversed_prefix(self, count: usize) -> Vec<Self::Item>
Collect a prefix from the reversed logical item stream.
Source§fn seq_iter(self) -> impl Iterator<Item = Self::Item>
fn seq_iter(self) -> impl Iterator<Item = Self::Item>
Convert the logical item stream into a sequential iterator. Read more
Source§fn seq_try_fold<T, B, F>(self, init: T, fold_fn: F) -> ControlFlow<B, T>
fn seq_try_fold<T, B, F>(self, init: T, fold_fn: F) -> ControlFlow<B, T>
Fold this iterator’s logical item stream left to right, stopping at the
first
ControlFlow::Break. Read moreSource§fn seq_fold<T, F>(self, init: T, fold_fn: F) -> T
fn seq_fold<T, F>(self, init: T, fold_fn: F) -> T
Fold this iterator’s logical item stream left to right. Read more
Source§fn map<F, R>(self, map_fn: F) -> Map<Self, F>
fn map<F, R>(self, map_fn: F) -> Map<Self, F>
Map operation that transforms each element in parallel.
Source§fn map_with<T, F, R>(self, init: T, map_fn: F) -> MapWith<Self, T, F>
fn map_with<T, F, R>(self, init: T, map_fn: F) -> MapWith<Self, T, F>
Map operation with cloned per-operation state.
Source§fn map_init<Init, T, F, R>(
self,
init: Init,
map_fn: F,
) -> MapInit<Self, Init, F>
fn map_init<Init, T, F, R>( self, init: Init, map_fn: F, ) -> MapInit<Self, Init, F>
Map operation with lazily initialized state.
Source§fn update<F>(self, update_fn: F) -> Update<Self, F>
fn update<F>(self, update_fn: F) -> Update<Self, F>
Mutate each item by reference and yield the mutated item.
Source§fn filter<F>(self, filter_fn: F) -> Filter<Self, F>
fn filter<F>(self, filter_fn: F) -> Filter<Self, F>
Filter operation that retains elements matching a predicate.
Source§fn inspect<F>(self, inspect_fn: F) -> Inspect<Self, F>
fn inspect<F>(self, inspect_fn: F) -> Inspect<Self, F>
Inspect each element by shared reference without changing the stream.
Source§fn panic_fuse(self) -> PanicFuse<Self>
fn panic_fuse(self) -> PanicFuse<Self>
Preserve value semantics while stopping sibling work after panic where applicable.
Source§fn filter_map<F, R>(self, filter_map_fn: F) -> FilterMap<Self, F>
fn filter_map<F, R>(self, filter_map_fn: F) -> FilterMap<Self, F>
Map each element to an optional value and retain present values.
Source§fn while_some<T>(self) -> WhileSome<Self>
fn while_some<T>(self) -> WhileSome<Self>
Unwrap a prefix of present values from an optional stream.
Source§fn flat_map<F, U>(self, flat_map_fn: F) -> FlatMap<Self, F>
fn flat_map<F, U>(self, flat_map_fn: F) -> FlatMap<Self, F>
Map each element to an iterator and flatten the resulting sequence.
Source§fn flat_map_iter<F, U>(self, flat_map_fn: F) -> FlatMap<Self, F>
fn flat_map_iter<F, U>(self, flat_map_fn: F) -> FlatMap<Self, F>
Map each element to a serial iterator and flatten the resulting sequence.
Source§fn flatten(self) -> Flatten<Self>
fn flatten(self) -> Flatten<Self>
Flatten nested item streams with standard left-to-right semantics.
Source§fn flatten_iter(self) -> Flatten<Self>
fn flatten_iter(self) -> Flatten<Self>
Flatten nested serial iterators with standard left-to-right semantics.
Source§fn enumerate(self) -> Enumerate<Self>
fn enumerate(self) -> Enumerate<Self>
Pair each element with its zero-based position in the logical sequence.
Source§fn zip<J>(self, other: J) -> Zip<Self, J>
fn zip<J>(self, other: J) -> Zip<Self, J>
Pair elements with another parallel iterator, stopping at the shorter input.
Source§fn zip_eq<J>(self, other: J) -> ZipEq<Self, J>
fn zip_eq<J>(self, other: J) -> ZipEq<Self, J>
Pair elements with another parallel iterator and require equal lengths.
Source§fn take(self, count: usize) -> Take<Self>
fn take(self, count: usize) -> Take<Self>
Retain at most
count elements from the logical sequence prefix.Source§fn take_any(self, count: usize) -> Take<Self>
fn take_any(self, count: usize) -> Take<Self>
Retain at most
count items from this non-indexed deterministic stream.Source§fn skip(self, count: usize) -> Skip<Self>
fn skip(self, count: usize) -> Skip<Self>
Discard
count elements from the logical sequence prefix.Source§fn skip_any(self, count: usize) -> Skip<Self>
fn skip_any(self, count: usize) -> Skip<Self>
Discard
count items from this non-indexed deterministic stream.Source§fn take_any_while<F>(self, predicate: F) -> TakeAnyWhile<Self, F>
fn take_any_while<F>(self, predicate: F) -> TakeAnyWhile<Self, F>
Retain this deterministic stream prefix while
predicate returns true.Source§fn skip_any_while<F>(self, predicate: F) -> SkipAnyWhile<Self, F>
fn skip_any_while<F>(self, predicate: F) -> SkipAnyWhile<Self, F>
Discard this deterministic stream prefix while
predicate returns true.Source§fn chain<J>(self, other: J) -> Chain<Self, J>
fn chain<J>(self, other: J) -> Chain<Self, J>
Concatenate this iterator with another iterator of the same item type.
Source§fn intersperse(self, separator: Self::Item) -> Intersperse<Self>
fn intersperse(self, separator: Self::Item) -> Intersperse<Self>
Insert a cloned separator between adjacent logical items.
Source§fn chunks(self, chunk_size: usize) -> Chunks<Self>
fn chunks(self, chunk_size: usize) -> Chunks<Self>
Group the logical item stream into non-empty chunks.
Source§fn copied<'data, T>(self) -> Copied<Self>
fn copied<'data, T>(self) -> Copied<Self>
Copy referenced items out of a borrowed parallel stream.
Source§fn cloned<'data, T>(self) -> Cloned<Self>
fn cloned<'data, T>(self) -> Cloned<Self>
Clone referenced items out of a borrowed parallel stream.
Source§fn reduce<F>(self, reduce_fn: F) -> Option<Self::Item>
fn reduce<F>(self, reduce_fn: F) -> Option<Self::Item>
Reduce operation that combines all elements.
Source§fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>
fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>
Collect into a list of owned vector segments. Read more
Source§fn partition<C, F>(self, predicate: F) -> (C, C)
fn partition<C, F>(self, predicate: F) -> (C, C)
Partition items into two collections while preserving relative order.
Source§fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
Split mapped
Either values into two collections while preserving side-local order.Source§fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
Split a stream of pairs into two collections while preserving order.
Source§fn sequential(self) -> SequentialAdapter<Self>
fn sequential(self) -> SequentialAdapter<Self>
Convert to a sequential iterator.
Source§fn find_first<F>(self, predicate: F) -> Option<Self::Item>
fn find_first<F>(self, predicate: F) -> Option<Self::Item>
Find the first element matching a predicate. Read more
Source§fn find_last<F>(self, predicate: F) -> Option<Self::Item>
fn find_last<F>(self, predicate: F) -> Option<Self::Item>
Find the last element matching a predicate in the logical stream.
Source§fn position_first<F>(self, predicate: F) -> Option<usize>
fn position_first<F>(self, predicate: F) -> Option<usize>
Find the first logical index matching a predicate. Read more
Source§fn position_any<F>(self, predicate: F) -> Option<usize>
fn position_any<F>(self, predicate: F) -> Option<usize>
Find any logical index matching a predicate.
Source§fn position_last<F>(self, predicate: F) -> Option<usize>
fn position_last<F>(self, predicate: F) -> Option<usize>
Find the last logical index matching a predicate. Read more
Source§fn positions<F>(self, predicate: F) -> Positions<Self, F>
fn positions<F>(self, predicate: F) -> Positions<Self, F>
Return all logical indices whose items match a predicate.
Source§fn find_map_first<F, R>(self, map_fn: F) -> Option<R>
fn find_map_first<F, R>(self, map_fn: F) -> Option<R>
Find and map the first matching element in the logical stream.
Source§fn find_map_any<F, R>(self, map_fn: F) -> Option<R>
fn find_map_any<F, R>(self, map_fn: F) -> Option<R>
Find and map any matching element in the logical stream. Read more
Source§fn find_map_last<F, R>(self, map_fn: F) -> Option<R>
fn find_map_last<F, R>(self, map_fn: F) -> Option<R>
Find and map the last matching element in the logical stream.
Source§fn for_each_with<T, F>(self, init: T, op: F)
fn for_each_with<T, F>(self, init: T, op: F)
Apply a function to each element with cloned per-operation state. Read more
Source§fn for_each_init<Init, T, F>(self, init: Init, op: F)
fn for_each_init<Init, T, F>(self, init: Init, op: F)
Apply a function to each element with lazily initialized state. Read more
Source§fn try_for_each<F, E>(self, op: F) -> Result<(), E>
fn try_for_each<F, E>(self, op: F) -> Result<(), E>
Apply a fallible function to each element and stop on the first error. Read more
Source§fn try_for_each_with<T, F, E>(self, init: T, op: F) -> Result<(), E>
fn try_for_each_with<T, F, E>(self, init: T, op: F) -> Result<(), E>
Apply a fallible function to each element with cloned per-operation state. Read more
Source§fn try_for_each_init<Init, T, F, E>(self, init: Init, op: F) -> Result<(), E>
fn try_for_each_init<Init, T, F, E>(self, init: Init, op: F) -> Result<(), E>
Apply a fallible function to each element with lazily initialized state. Read more
Source§fn reduce_with<F>(self, reduce_fn: F) -> Option<Self::Item>
fn reduce_with<F>(self, reduce_fn: F) -> Option<Self::Item>
Reduce with an associative operation.
Source§fn try_reduce<Identity, F, T, E>(
self,
identity: Identity,
reduce_fn: F,
) -> Result<T, E>
fn try_reduce<Identity, F, T, E>( self, identity: Identity, reduce_fn: F, ) -> Result<T, E>
Reduce a fallible item stream with an identity and associative operation.
Source§fn try_reduce_with<F>(self, reduce_fn: F) -> Option<Self::Item>where
Self::Item: TryStreamItem,
F: Fn(<Self::Item as TryStreamItem>::Output, <Self::Item as TryStreamItem>::Output) -> Self::Item + Send + Sync + Clone,
fn try_reduce_with<F>(self, reduce_fn: F) -> Option<Self::Item>where
Self::Item: TryStreamItem,
F: Fn(<Self::Item as TryStreamItem>::Output, <Self::Item as TryStreamItem>::Output) -> Self::Item + Send + Sync + Clone,
Reduce a fallible item stream without an identity value.
Source§fn sum<S>(self) -> S
fn sum<S>(self) -> S
Sum the complete logical stream through one standard
Iterator::sum
invocation. Read moreSource§fn sum_reassociated<S>(self) -> S
fn sum_reassociated<S>(self) -> S
Sum independently produced item fragments and merge their outputs. Read more
Source§fn product<P>(self) -> P
fn product<P>(self) -> P
Multiply the complete logical stream through one standard
Iterator::product invocation. Read moreSource§fn product_reassociated<P>(self) -> P
fn product_reassociated<P>(self) -> P
Multiply independently produced item fragments and merge their outputs. Read more
Source§fn min_by<F>(self, compare: F) -> Option<Self::Item>
fn min_by<F>(self, compare: F) -> Option<Self::Item>
Return the minimum item according to a comparator. Read more
Source§fn max_by<F>(self, compare: F) -> Option<Self::Item>
fn max_by<F>(self, compare: F) -> Option<Self::Item>
Return the maximum item according to a comparator. Read more
Source§fn min_by_key<K, F>(self, key_fn: F) -> Option<Self::Item>
fn min_by_key<K, F>(self, key_fn: F) -> Option<Self::Item>
Return the minimum item according to an ordered key. Read more
Auto Trait Implementations§
impl<I> Freeze for Rev<I>where
I: Freeze,
impl<I> RefUnwindSafe for Rev<I>where
I: RefUnwindSafe,
impl<I> Send for Rev<I>where
I: Send,
impl<I> Sync for Rev<I>where
I: Sync,
impl<I> Unpin for Rev<I>where
I: Unpin,
impl<I> UnsafeUnpin for Rev<I>where
I: UnsafeUnpin,
impl<I> UnwindSafe for Rev<I>where
I: 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