struct LengthSplitter {
    inner: Splitter,
    min: usize,
}Expand description
The length splitter is built on thief-splitting, but additionally takes into account the remaining length of the iterator.
Fields§
§inner: Splitter§min: usizeThe smallest we’re willing to divide into.  Usually this is just 1,
but you can choose a larger working size with with_min_len().
Implementations§
Source§impl LengthSplitter
 
impl LengthSplitter
Sourcefn new(min: usize, max: usize, len: usize) -> LengthSplitter
 
fn new(min: usize, max: usize, len: usize) -> LengthSplitter
Creates a new splitter based on lengths.
The min is a hard lower bound.  We’ll never split below that, but
of course an iterator might start out smaller already.
The max is an upper bound on the working size, used to determine
the minimum number of times we need to split to get under that limit.
The adaptive algorithm may very well split even further, but never
smaller than the min.
fn try_split(&mut self, len: usize, stolen: bool) -> bool
Trait Implementations§
Source§impl Clone for LengthSplitter
 
impl Clone for LengthSplitter
Source§fn clone(&self) -> LengthSplitter
 
fn clone(&self) -> LengthSplitter
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read moreimpl Copy for LengthSplitter
Auto Trait Implementations§
impl Freeze for LengthSplitter
impl RefUnwindSafe for LengthSplitter
impl Send for LengthSplitter
impl Sync for LengthSplitter
impl Unpin for LengthSplitter
impl UnwindSafe for LengthSplitter
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> IntoEither for T
 
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
 
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts 
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
 
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts 
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more