pub struct Merge<Lhs, Rhs, F>where
Lhs: Bulk<Item: Into<<F as FnOnce<(Lhs::Item, Rhs::Item)>>::Output>>,
Rhs: Bulk<Item: Into<<F as FnOnce<(Lhs::Item, Rhs::Item)>>::Output>>,
F: FnMut<(Lhs::Item, Rhs::Item)>,{ /* private fields */ }Trait Implementations§
Source§impl<Lhs, Rhs, F, O> Bulk for Merge<Lhs, Rhs, F>
impl<Lhs, Rhs, F, O> Bulk for Merge<Lhs, Rhs, F>
type Length = <<Lhs as Bulk>::Length as Length>::Max<<Rhs as Bulk>::Length>
type MinLength = <<Lhs as Bulk>::MinLength as Length>::Max<<Rhs as Bulk>::MinLength>
type MaxLength = <<Lhs as Bulk>::MaxLength as Length>::Max<<Rhs as Bulk>::MaxLength>
Source§fn first(self) -> Option<Self::Item>where
Self: Sized,
fn first(self) -> Option<Self::Item>where
Self: Sized,
Returns the first value, and discards the rest of the bulk. Read more
Source§fn try_for_each<FF, R>(self, f: FF) -> R
fn try_for_each<FF, R>(self, f: FF) -> R
A bulk method that applies a fallible function to each item in the
bulk, stopping at the first error and returning that error. Read more
fn length(&self) -> Value<Self::Length>
Source§fn last(self) -> Option<Self::Item>
fn last(self) -> Option<Self::Item>
Returns the last value, and discards the rest of the bulk. Read more
Source§fn nth<L>(self, n: L) -> Option<Self::Item>
fn nth<L>(self, n: L) -> Option<Self::Item>
Returns the
n-th value, and discards the rest of the bulk. Read morefn many<NN, const N: usize>(self, n: NN) -> [Option<Self::Item>; N]
Source§fn fold<B, F>(self, init: B, f: F) -> B
fn fold<B, F>(self, init: B, f: F) -> B
Folds every element into an accumulator by applying an operation,
returning the final result. Read more
fn try_fold<B, F, R>(self, init: B, f: F) -> R
fn reduce<F>(self, f: F) -> Option<Self::Item>
fn try_reduce<F, R>( self, f: F, ) -> <R::Residual as Residual<Option<R::Output>>>::TryType
Source§fn max_by_key<B, F>(self, keygen: F) -> Option<Self::Item>
fn max_by_key<B, F>(self, keygen: F) -> Option<Self::Item>
Returns the element that gives the maximum value from the
specified function. Read more
Source§fn max_by<F>(self, compare: F) -> Option<Self::Item>
fn max_by<F>(self, compare: F) -> Option<Self::Item>
Returns the element that gives the maximum value with respect to the
specified comparison function. Read more
Source§fn min_by_key<B, F>(self, keygen: F) -> Option<Self::Item>
fn min_by_key<B, F>(self, keygen: F) -> Option<Self::Item>
Returns the element that gives the minimum value from the
specified function. Read more
Source§fn min_by<F>(self, compare: F) -> Option<Self::Item>
fn min_by<F>(self, compare: F) -> Option<Self::Item>
Returns the element that gives the minimum value with respect to the
specified comparison function. Read more
Source§fn step_by<L>(self, step: L) -> StepBy<Self, L::Length<()>> ⓘwhere
Self: Sized,
L: LengthValue,
fn step_by<L>(self, step: L) -> StepBy<Self, L::Length<()>> ⓘwhere
Self: Sized,
L: LengthValue,
Creates a bulk starting at the same point, but stepping by
the given amount at each iteration. Read more
Source§fn chain<U>(self, other: U) -> Chain<Self, U::IntoBulk> ⓘ
fn chain<U>(self, other: U) -> Chain<Self, U::IntoBulk> ⓘ
Takes two bulks and creates a new bulk over both in sequence. Read more
Source§fn zip<U>(
self,
other: U,
) -> Zip<Self, <<U as IntoContained>::IntoContained as IntoBulk>::IntoBulk> ⓘwhere
Self: Sized,
U: IntoContainedBy<Self>,
fn zip<U>(
self,
other: U,
) -> Zip<Self, <<U as IntoContained>::IntoContained as IntoBulk>::IntoBulk> ⓘwhere
Self: Sized,
U: IntoContainedBy<Self>,
‘Zips up’ two bulks or iterators into a single bulk of pairs. One of them must be a bulk. Read more
Source§fn merge<U, F, O>(self, other: U, merger: F) -> Merge<Self, U::IntoBulk, F> ⓘ
fn merge<U, F, O>(self, other: U, merger: F) -> Merge<Self, U::IntoBulk, F> ⓘ
Merges two bulks or iterators into a single bulk using a merging function. Read more
Source§fn intersperse(self, separator: Self::Item) -> Intersperse<Self> ⓘ
fn intersperse(self, separator: Self::Item) -> Intersperse<Self> ⓘ
Creates a new bulk which places a copy of
separator between adjacent
items of the original bulk. Read moreSource§fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G> ⓘ
fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G> ⓘ
Creates a new bulk which places an item generated by
separator
between adjacent items of the original bulk. Read moreSource§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 bulk which calls that closure on each
element. Read more
Source§fn enumerate(self) -> Enumerate<Self> ⓘwhere
Self: Sized,
fn enumerate(self) -> Enumerate<Self> ⓘwhere
Self: Sized,
Creates a bulk which gives the current index together with its values. Read more
Source§fn enumerate_from<U>(self, initial_count: U) -> EnumerateFrom<Self, U> ⓘ
fn enumerate_from<U>(self, initial_count: U) -> EnumerateFrom<Self, U> ⓘ
Creates a bulk which gives the current index counting from a given initial index together with its values. Read more
Source§fn skip<L>(self, n: L) -> Skip<Self, L::Length<()>> ⓘwhere
Self: Sized,
L: LengthValue,
fn skip<L>(self, n: L) -> Skip<Self, L::Length<()>> ⓘwhere
Self: Sized,
L: LengthValue,
Creates a bulk that skips the first
n elements. Read moreSource§fn take<L>(self, n: L) -> Take<Self, L::Length<()>> ⓘwhere
Self: Sized,
L: LengthValue,
fn take<L>(self, n: L) -> Take<Self, L::Length<()>> ⓘwhere
Self: Sized,
L: LengthValue,
Creates a bulk for the first
n elements, or fewer
if the underlying bulk/iterator is shorter. Read moreSource§fn flat_map<U, F>(self, f: F) -> FlatMap<Self, F> ⓘ
fn flat_map<U, F>(self, f: F) -> FlatMap<Self, F> ⓘ
Creates a bulk that works like map, but flattens nested structure. Read more
Source§fn map_windows<F, R, const N: usize>(self, f: F) -> MapWindows<Self, F, N> ⓘ
fn map_windows<F, R, const N: usize>(self, f: F) -> MapWindows<Self, F, N> ⓘ
Calls the given function
f for each contiguous window of size N over
self and returns a bulk of the outputs of f. The windows during mapping will overlap. Read moreSource§fn inspect<F>(self, f: F) -> Inspect<Self, F> ⓘ
fn inspect<F>(self, f: F) -> Inspect<Self, F> ⓘ
Does something with each element of a bulk, passing the value on. Read more
Source§fn mutate<F>(self, f: F) -> Mutate<Self, F> ⓘ
fn mutate<F>(self, f: F) -> Mutate<Self, F> ⓘ
Mutates with each element of a bulk, passing the value on. Read more
Source§fn collect<C, A>(self) -> Cwhere
Self: Sized,
C: FromBulk<A>,
A: CollectionAdapter<Elem = Self::Item> + CollectionStrategy<Self, C> + ?Sized,
fn collect<C, A>(self) -> Cwhere
Self: Sized,
C: FromBulk<A>,
A: CollectionAdapter<Elem = Self::Item> + CollectionStrategy<Self, C> + ?Sized,
Transforms a bulk into a collection. Read more
Source§fn try_collect<C, A>(
self,
) -> <<Self::Item as Try>::Residual as Residual<C>>::TryType
fn try_collect<C, A>( self, ) -> <<Self::Item as Try>::Residual as Residual<C>>::TryType
Fallibly transforms a bulk into a collection, short circuiting if
a failure is encountered. Read more
Source§fn collect_array(
self,
) -> <Self as StaticBulk>::Array<<Self as IntoIterator>::Item>where
Self: StaticBulk,
fn collect_array(
self,
) -> <Self as StaticBulk>::Array<<Self as IntoIterator>::Item>where
Self: StaticBulk,
Transforms a statically sized bulk into an array.
The bulk must implement
StaticBulk. Read moreSource§fn try_collect_array(
self,
) -> <<Self::Item as Try>::Residual as Residual<Self::Array<<Self::Item as Try>::Output>>>::TryType
fn try_collect_array( self, ) -> <<Self::Item as Try>::Residual as Residual<Self::Array<<Self::Item as Try>::Output>>>::TryType
Fallibly transforms a statically sized bulk into an array, short circuiting if
a failure is encountered.
The bulk must implement
StaticBulk. Read moreSource§fn resize<N>(self, n: N, element: Self::Item) -> Resize<Self, N::Length<()>> ⓘ
fn resize<N>(self, n: N, element: Self::Item) -> Resize<Self, N::Length<()>> ⓘ
Resizes a bulk, padding it with copies of a given value of
element if too short, or truncating it if too long.
The resuling bulk will have an exact length given by n. Read moreSource§fn resize_with<F, N>(
self,
n: N,
padder: F,
) -> ResizeWith<Self, F, N::Length<()>> ⓘ
fn resize_with<F, N>( self, n: N, padder: F, ) -> ResizeWith<Self, F, N::Length<()>> ⓘ
Resizes a bulk, padding it with the output of
padder if too short, or truncating it if too long.
The resuling bulk will have an exact length given by n. Read moreSource§fn rev(self) -> Rev<Self> ⓘwhere
Self: Sized + DoubleEndedBulk,
fn rev(self) -> Rev<Self> ⓘwhere
Self: Sized + DoubleEndedBulk,
Reverses a bulks’s direction. Read more
Source§fn copied<'a, T>(self) -> Copied<Self> ⓘ
fn copied<'a, T>(self) -> Copied<Self> ⓘ
Creates a bulk which copies all of its elements. Read more
Source§fn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N> ⓘwhere
Self: Sized,
fn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N> ⓘwhere
Self: Sized,
Returns a bulk of
N elements of the bulk at a time. Read moreSource§fn split_at<L>(self, n: L) -> (Self::Left, Self::Right)
fn split_at<L>(self, n: L) -> (Self::Left, Self::Right)
Splits a bulk in two at a specified index. Read more
Source§fn rsplit_at<L>(self, n: L) -> (Self::Left, Self::Right)where
Self: SplitBulk<SaturatingSub<<<Self as Bulk>::Length as Length>::Value, L>> + Sized,
L: LengthValue,
fn rsplit_at<L>(self, n: L) -> (Self::Left, Self::Right)where
Self: SplitBulk<SaturatingSub<<<Self as Bulk>::Length as Length>::Value, L>> + Sized,
L: LengthValue,
Splits a bulk in two at a specified reversed index. Read more
Source§fn swap<S>(self, lhs: impl LengthValue, rhs: impl LengthValue)
fn swap<S>(self, lhs: impl LengthValue, rhs: impl LengthValue)
Consumes the bulk, and swaps two elements of it. Items must be mutably dereferenceable. Read more
Source§fn try_swap<S>(
self,
lhs: impl LengthValue,
rhs: impl LengthValue,
) -> Result<(), OutOfRange>
fn try_swap<S>( self, lhs: impl LengthValue, rhs: impl LengthValue, ) -> Result<(), OutOfRange>
Consumes the bulk, and swaps two elements of it. Items must be mutably dereferenceable. Read more
fn sum_from<T>(self, from: T) -> T
fn product_from<T>(self, from: T) -> T
Source§impl<Lhs, Rhs, F, O> DoubleEndedBulk for Merge<Lhs, Rhs, F>where
Lhs: DoubleEndedBulk<Item: Into<O>>,
Rhs: DoubleEndedBulk<Item: Into<O>>,
F: FnMut(Lhs::Item, Rhs::Item) -> O,
impl<Lhs, Rhs, F, O> DoubleEndedBulk for Merge<Lhs, Rhs, F>where
Lhs: DoubleEndedBulk<Item: Into<O>>,
Rhs: DoubleEndedBulk<Item: Into<O>>,
F: FnMut(Lhs::Item, Rhs::Item) -> O,
Source§fn rev_for_each<FF>(self, f: FF)
fn rev_for_each<FF>(self, f: FF)
Calls a closure on each element of a bulk in reverse.
Source§impl<Lhs, Rhs, F, O> IntoIterator for Merge<Lhs, Rhs, F>
impl<Lhs, Rhs, F, O> IntoIterator for Merge<Lhs, Rhs, F>
Source§type IntoIter = IntoIter<<Lhs as IntoIterator>::IntoIter, <Rhs as IntoIterator>::IntoIter, F, O>
type IntoIter = IntoIter<<Lhs as IntoIterator>::IntoIter, <Rhs as IntoIterator>::IntoIter, F, O>
Which kind of iterator are we turning this into?
Auto Trait Implementations§
impl<Lhs, Rhs, F> Freeze for Merge<Lhs, Rhs, F>where
<Rhs as IntoIterator>::Item: Sized,
<Lhs as IntoIterator>::Item: Sized,
Lhs: Freeze,
Rhs: Freeze,
F: Freeze,
impl<Lhs, Rhs, F> RefUnwindSafe for Merge<Lhs, Rhs, F>where
<Rhs as IntoIterator>::Item: Sized,
<Lhs as IntoIterator>::Item: Sized,
Lhs: RefUnwindSafe,
Rhs: RefUnwindSafe,
F: RefUnwindSafe,
impl<Lhs, Rhs, F> Send for Merge<Lhs, Rhs, F>where
<Rhs as IntoIterator>::Item: Sized,
<Lhs as IntoIterator>::Item: Sized,
Lhs: Send,
Rhs: Send,
F: Send,
impl<Lhs, Rhs, F> Sync for Merge<Lhs, Rhs, F>where
<Rhs as IntoIterator>::Item: Sized,
<Lhs as IntoIterator>::Item: Sized,
Lhs: Sync,
Rhs: Sync,
F: Sync,
impl<Lhs, Rhs, F> Unpin for Merge<Lhs, Rhs, F>where
<Rhs as IntoIterator>::Item: Sized,
<Lhs as IntoIterator>::Item: Sized,
Lhs: Unpin,
Rhs: Unpin,
F: Unpin,
impl<Lhs, Rhs, F> UnsafeUnpin for Merge<Lhs, Rhs, F>where
<Rhs as IntoIterator>::Item: Sized,
<Lhs as IntoIterator>::Item: Sized,
Lhs: UnsafeUnpin,
Rhs: UnsafeUnpin,
F: UnsafeUnpin,
impl<Lhs, Rhs, F> UnwindSafe for Merge<Lhs, Rhs, F>where
<Rhs as IntoIterator>::Item: Sized,
<Lhs as IntoIterator>::Item: Sized,
Lhs: UnwindSafe,
Rhs: UnwindSafe,
F: 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> CollectNearest for Iwhere
I: Bulk + StaticBulk,
impl<I> CollectNearest for Iwhere
I: Bulk + StaticBulk,
type Nearest = <I as StaticBulk>::Array<<I as IntoIterator>::Item>
type TryNearest = <I as StaticBulk>::Array<<<I as IntoIterator>::Item as Try>::Output> where <I as IntoIterator>::Item: Try
Source§fn collect_nearest(self) -> <I as CollectNearest>::Nearestwhere
I: Sized,
fn collect_nearest(self) -> <I as CollectNearest>::Nearestwhere
I: Sized,
Collects into an array if possible, otherwise a vector
Source§fn try_collect_nearest(
self,
) -> <<<I as IntoIterator>::Item as Try>::Residual as Residual<<I as CollectNearest>::TryNearest>>::TryTypewhere
I: Sized,
<I as IntoIterator>::Item: Try,
<<I as IntoIterator>::Item as Try>::Residual: Residual<<I as CollectNearest>::TryNearest> + Residual<()>,
fn try_collect_nearest(
self,
) -> <<<I as IntoIterator>::Item as Try>::Residual as Residual<<I as CollectNearest>::TryNearest>>::TryTypewhere
I: Sized,
<I as IntoIterator>::Item: Try,
<<I as IntoIterator>::Item as Try>::Residual: Residual<<I as CollectNearest>::TryNearest> + Residual<()>,
Fallibly collects into an array if possible, otherwise a vector