Trait slice_group_by::GroupByMut
source · [−]pub trait GroupByMut<T> {
fn linear_group_by_key_mut<F, K>(
&mut self,
func: F
) -> LinearGroupByKeyMut<'_, T, F>ⓘNotable traits for LinearGroupByKeyMut<'a, T, F>impl<'a, T: 'a, F, K> Iterator for LinearGroupByKeyMut<'a, T, F> where
F: FnMut(&T) -> K,
K: PartialEq, type Item = &'a mut [T];
where
F: FnMut(&T) -> K,
K: PartialEq;
fn linear_group_by_mut<P>(
&mut self,
predicate: P
) -> LinearGroupByMut<'_, T, P>ⓘNotable traits for LinearGroupByMut<'a, T, P>impl<'a, T: 'a, P> Iterator for LinearGroupByMut<'a, T, P> where
P: FnMut(&T, &T) -> bool, type Item = &'a mut [T];
where
P: FnMut(&T, &T) -> bool;
fn linear_group_mut(&mut self) -> LinearGroupMut<'_, T>ⓘNotable traits for LinearGroupMut<'a, T>impl<'a, T: 'a> Iterator for LinearGroupMut<'a, T> where
T: PartialEq, type Item = &'a mut [T];
where
T: PartialEq;
fn binary_group_by_key_mut<F, K>(
&mut self,
func: F
) -> BinaryGroupByKeyMut<'_, T, F>ⓘNotable traits for BinaryGroupByKeyMut<'a, T, F>impl<'a, T: 'a, F, K> Iterator for BinaryGroupByKeyMut<'a, T, F> where
F: FnMut(&T) -> K,
K: PartialEq, type Item = &'a mut [T];
where
F: FnMut(&T) -> K,
K: PartialEq;
fn binary_group_by_mut<P>(
&mut self,
predicate: P
) -> BinaryGroupByMut<'_, T, P>ⓘNotable traits for BinaryGroupByMut<'a, T, P>impl<'a, T: 'a, P> Iterator for BinaryGroupByMut<'a, T, P> where
P: FnMut(&T, &T) -> bool, type Item = &'a mut [T];
where
P: FnMut(&T, &T) -> bool;
fn binary_group_mut(&mut self) -> BinaryGroupMut<'_, T>ⓘNotable traits for BinaryGroupMut<'a, T>impl<'a, T: 'a> Iterator for BinaryGroupMut<'a, T> where
T: PartialEq, type Item = &'a mut [T];
where
T: PartialEq;
fn exponential_group_by_key_mut<F, K>(
&mut self,
func: F
) -> ExponentialGroupByKeyMut<'_, T, F>ⓘNotable traits for ExponentialGroupByKeyMut<'a, T, F>impl<'a, T: 'a, F, K> Iterator for ExponentialGroupByKeyMut<'a, T, F> where
F: FnMut(&T) -> K,
K: PartialEq, type Item = &'a mut [T];
where
F: Fn(&T) -> K,
K: PartialEq;
fn exponential_group_by_mut<P>(
&mut self,
predicate: P
) -> ExponentialGroupByMut<'_, T, P>ⓘNotable traits for ExponentialGroupByMut<'a, T, P>impl<'a, T: 'a, P> Iterator for ExponentialGroupByMut<'a, T, P> where
P: FnMut(&T, &T) -> bool, type Item = &'a mut [T];
where
P: FnMut(&T, &T) -> bool;
fn exponential_group_mut(&mut self) -> ExponentialGroupMut<'_, T>ⓘNotable traits for ExponentialGroupMut<'a, T>impl<'a, T: 'a> Iterator for ExponentialGroupMut<'a, T> where
T: PartialEq, type Item = &'a mut [T];
where
T: PartialEq;
}
Expand description
A convenient trait to construct an iterator returning non-overlapping mutable groups defined by a predicate.
Required methods
fn linear_group_by_key_mut<F, K>(
&mut self,
func: F
) -> LinearGroupByKeyMut<'_, T, F>ⓘNotable traits for LinearGroupByKeyMut<'a, T, F>impl<'a, T: 'a, F, K> Iterator for LinearGroupByKeyMut<'a, T, F> where
F: FnMut(&T) -> K,
K: PartialEq, type Item = &'a mut [T];
where
F: FnMut(&T) -> K,
K: PartialEq,
fn linear_group_by_key_mut<F, K>(
&mut self,
func: F
) -> LinearGroupByKeyMut<'_, T, F>ⓘNotable traits for LinearGroupByKeyMut<'a, T, F>impl<'a, T: 'a, F, K> Iterator for LinearGroupByKeyMut<'a, T, F> where
F: FnMut(&T) -> K,
K: PartialEq, type Item = &'a mut [T];
where
F: FnMut(&T) -> K,
K: PartialEq,
F: FnMut(&T) -> K,
K: PartialEq, type Item = &'a mut [T];
Returns an iterator on mutable slice groups based that will use the given function to generate keys and determine groups based on them. It uses linear search to iterate over groups.
fn linear_group_by_mut<P>(&mut self, predicate: P) -> LinearGroupByMut<'_, T, P>ⓘNotable traits for LinearGroupByMut<'a, T, P>impl<'a, T: 'a, P> Iterator for LinearGroupByMut<'a, T, P> where
P: FnMut(&T, &T) -> bool, type Item = &'a mut [T];
where
P: FnMut(&T, &T) -> bool,
fn linear_group_by_mut<P>(&mut self, predicate: P) -> LinearGroupByMut<'_, T, P>ⓘNotable traits for LinearGroupByMut<'a, T, P>impl<'a, T: 'a, P> Iterator for LinearGroupByMut<'a, T, P> where
P: FnMut(&T, &T) -> bool, type Item = &'a mut [T];
where
P: FnMut(&T, &T) -> bool,
P: FnMut(&T, &T) -> bool, type Item = &'a mut [T];
Returns an iterator on mutable slice groups using the linear search method.
fn linear_group_mut(&mut self) -> LinearGroupMut<'_, T>ⓘNotable traits for LinearGroupMut<'a, T>impl<'a, T: 'a> Iterator for LinearGroupMut<'a, T> where
T: PartialEq, type Item = &'a mut [T];
where
T: PartialEq,
fn linear_group_mut(&mut self) -> LinearGroupMut<'_, T>ⓘNotable traits for LinearGroupMut<'a, T>impl<'a, T: 'a> Iterator for LinearGroupMut<'a, T> where
T: PartialEq, type Item = &'a mut [T];
where
T: PartialEq,
T: PartialEq, type Item = &'a mut [T];
Returns an iterator on mutable slice groups based on the PartialEq::eq
method of T
,
it uses linear search to iterate over groups.
fn binary_group_by_key_mut<F, K>(
&mut self,
func: F
) -> BinaryGroupByKeyMut<'_, T, F>ⓘNotable traits for BinaryGroupByKeyMut<'a, T, F>impl<'a, T: 'a, F, K> Iterator for BinaryGroupByKeyMut<'a, T, F> where
F: FnMut(&T) -> K,
K: PartialEq, type Item = &'a mut [T];
where
F: FnMut(&T) -> K,
K: PartialEq,
fn binary_group_by_key_mut<F, K>(
&mut self,
func: F
) -> BinaryGroupByKeyMut<'_, T, F>ⓘNotable traits for BinaryGroupByKeyMut<'a, T, F>impl<'a, T: 'a, F, K> Iterator for BinaryGroupByKeyMut<'a, T, F> where
F: FnMut(&T) -> K,
K: PartialEq, type Item = &'a mut [T];
where
F: FnMut(&T) -> K,
K: PartialEq,
F: FnMut(&T) -> K,
K: PartialEq, type Item = &'a mut [T];
Returns an iterator on mutable slice groups based that will use the given function to generate keys and determine groups based on them. It uses binary search to iterate over groups.
The predicate function should implement an order consistent with the sort order of the slice.
fn binary_group_by_mut<P>(&mut self, predicate: P) -> BinaryGroupByMut<'_, T, P>ⓘNotable traits for BinaryGroupByMut<'a, T, P>impl<'a, T: 'a, P> Iterator for BinaryGroupByMut<'a, T, P> where
P: FnMut(&T, &T) -> bool, type Item = &'a mut [T];
where
P: FnMut(&T, &T) -> bool,
fn binary_group_by_mut<P>(&mut self, predicate: P) -> BinaryGroupByMut<'_, T, P>ⓘNotable traits for BinaryGroupByMut<'a, T, P>impl<'a, T: 'a, P> Iterator for BinaryGroupByMut<'a, T, P> where
P: FnMut(&T, &T) -> bool, type Item = &'a mut [T];
where
P: FnMut(&T, &T) -> bool,
P: FnMut(&T, &T) -> bool, type Item = &'a mut [T];
Returns an iterator on mutable slice groups using the binary search method.
The predicate function should implement an order consistent with the sort order of the slice.
fn binary_group_mut(&mut self) -> BinaryGroupMut<'_, T>ⓘNotable traits for BinaryGroupMut<'a, T>impl<'a, T: 'a> Iterator for BinaryGroupMut<'a, T> where
T: PartialEq, type Item = &'a mut [T];
where
T: PartialEq,
fn binary_group_mut(&mut self) -> BinaryGroupMut<'_, T>ⓘNotable traits for BinaryGroupMut<'a, T>impl<'a, T: 'a> Iterator for BinaryGroupMut<'a, T> where
T: PartialEq, type Item = &'a mut [T];
where
T: PartialEq,
T: PartialEq, type Item = &'a mut [T];
Returns an iterator on mutable slice groups based on the PartialEq::eq
method of T
,
it uses binary search to iterate over groups.
The predicate function should implement an order consistent with the sort order of the slice.
fn exponential_group_by_key_mut<F, K>(
&mut self,
func: F
) -> ExponentialGroupByKeyMut<'_, T, F>ⓘNotable traits for ExponentialGroupByKeyMut<'a, T, F>impl<'a, T: 'a, F, K> Iterator for ExponentialGroupByKeyMut<'a, T, F> where
F: FnMut(&T) -> K,
K: PartialEq, type Item = &'a mut [T];
where
F: Fn(&T) -> K,
K: PartialEq,
fn exponential_group_by_key_mut<F, K>(
&mut self,
func: F
) -> ExponentialGroupByKeyMut<'_, T, F>ⓘNotable traits for ExponentialGroupByKeyMut<'a, T, F>impl<'a, T: 'a, F, K> Iterator for ExponentialGroupByKeyMut<'a, T, F> where
F: FnMut(&T) -> K,
K: PartialEq, type Item = &'a mut [T];
where
F: Fn(&T) -> K,
K: PartialEq,
F: FnMut(&T) -> K,
K: PartialEq, type Item = &'a mut [T];
Returns an iterator on mutable slice groups based that will use the given function to generate keys and determine groups based on them. It uses exponential search to iterate over groups.
The predicate function should implement an order consistent with the sort order of the slice.
fn exponential_group_by_mut<P>(
&mut self,
predicate: P
) -> ExponentialGroupByMut<'_, T, P>ⓘNotable traits for ExponentialGroupByMut<'a, T, P>impl<'a, T: 'a, P> Iterator for ExponentialGroupByMut<'a, T, P> where
P: FnMut(&T, &T) -> bool, type Item = &'a mut [T];
where
P: FnMut(&T, &T) -> bool,
fn exponential_group_by_mut<P>(
&mut self,
predicate: P
) -> ExponentialGroupByMut<'_, T, P>ⓘNotable traits for ExponentialGroupByMut<'a, T, P>impl<'a, T: 'a, P> Iterator for ExponentialGroupByMut<'a, T, P> where
P: FnMut(&T, &T) -> bool, type Item = &'a mut [T];
where
P: FnMut(&T, &T) -> bool,
P: FnMut(&T, &T) -> bool, type Item = &'a mut [T];
Returns an iterator on mutable slice groups using the exponential search method.
The predicate function should implement an order consistent with the sort order of the slice.
fn exponential_group_mut(&mut self) -> ExponentialGroupMut<'_, T>ⓘNotable traits for ExponentialGroupMut<'a, T>impl<'a, T: 'a> Iterator for ExponentialGroupMut<'a, T> where
T: PartialEq, type Item = &'a mut [T];
where
T: PartialEq,
fn exponential_group_mut(&mut self) -> ExponentialGroupMut<'_, T>ⓘNotable traits for ExponentialGroupMut<'a, T>impl<'a, T: 'a> Iterator for ExponentialGroupMut<'a, T> where
T: PartialEq, type Item = &'a mut [T];
where
T: PartialEq,
T: PartialEq, type Item = &'a mut [T];
Returns an iterator on mutable slice groups based on the PartialEq::eq
method of T
,
it uses exponential search to iterate over groups.
The predicate function should implement an order consistent with the sort order of the slice.
Implementations on Foreign Types
sourceimpl<T> GroupByMut<T> for [T]
impl<T> GroupByMut<T> for [T]
fn linear_group_by_key_mut<F, K>(
&mut self,
func: F
) -> LinearGroupByKeyMut<'_, T, F>ⓘNotable traits for LinearGroupByKeyMut<'a, T, F>impl<'a, T: 'a, F, K> Iterator for LinearGroupByKeyMut<'a, T, F> where
F: FnMut(&T) -> K,
K: PartialEq, type Item = &'a mut [T];
where
F: FnMut(&T) -> K,
K: PartialEq,
F: FnMut(&T) -> K,
K: PartialEq, type Item = &'a mut [T];
fn linear_group_by_mut<P>(&mut self, predicate: P) -> LinearGroupByMut<'_, T, P>ⓘNotable traits for LinearGroupByMut<'a, T, P>impl<'a, T: 'a, P> Iterator for LinearGroupByMut<'a, T, P> where
P: FnMut(&T, &T) -> bool, type Item = &'a mut [T];
where
P: FnMut(&T, &T) -> bool,
P: FnMut(&T, &T) -> bool, type Item = &'a mut [T];
fn linear_group_mut(&mut self) -> LinearGroupMut<'_, T>ⓘNotable traits for LinearGroupMut<'a, T>impl<'a, T: 'a> Iterator for LinearGroupMut<'a, T> where
T: PartialEq, type Item = &'a mut [T];
where
T: PartialEq,
T: PartialEq, type Item = &'a mut [T];
fn binary_group_by_key_mut<F, K>(
&mut self,
func: F
) -> BinaryGroupByKeyMut<'_, T, F>ⓘNotable traits for BinaryGroupByKeyMut<'a, T, F>impl<'a, T: 'a, F, K> Iterator for BinaryGroupByKeyMut<'a, T, F> where
F: FnMut(&T) -> K,
K: PartialEq, type Item = &'a mut [T];
where
F: FnMut(&T) -> K,
K: PartialEq,
F: FnMut(&T) -> K,
K: PartialEq, type Item = &'a mut [T];
fn binary_group_by_mut<P>(&mut self, predicate: P) -> BinaryGroupByMut<'_, T, P>ⓘNotable traits for BinaryGroupByMut<'a, T, P>impl<'a, T: 'a, P> Iterator for BinaryGroupByMut<'a, T, P> where
P: FnMut(&T, &T) -> bool, type Item = &'a mut [T];
where
P: FnMut(&T, &T) -> bool,
P: FnMut(&T, &T) -> bool, type Item = &'a mut [T];
fn binary_group_mut(&mut self) -> BinaryGroupMut<'_, T>ⓘNotable traits for BinaryGroupMut<'a, T>impl<'a, T: 'a> Iterator for BinaryGroupMut<'a, T> where
T: PartialEq, type Item = &'a mut [T];
where
T: PartialEq,
T: PartialEq, type Item = &'a mut [T];
fn exponential_group_by_key_mut<F, K>(
&mut self,
func: F
) -> ExponentialGroupByKeyMut<'_, T, F>ⓘNotable traits for ExponentialGroupByKeyMut<'a, T, F>impl<'a, T: 'a, F, K> Iterator for ExponentialGroupByKeyMut<'a, T, F> where
F: FnMut(&T) -> K,
K: PartialEq, type Item = &'a mut [T];
where
F: Fn(&T) -> K,
K: PartialEq,
F: FnMut(&T) -> K,
K: PartialEq, type Item = &'a mut [T];
fn exponential_group_by_mut<P>(
&mut self,
predicate: P
) -> ExponentialGroupByMut<'_, T, P>ⓘNotable traits for ExponentialGroupByMut<'a, T, P>impl<'a, T: 'a, P> Iterator for ExponentialGroupByMut<'a, T, P> where
P: FnMut(&T, &T) -> bool, type Item = &'a mut [T];
where
P: FnMut(&T, &T) -> bool,
P: FnMut(&T, &T) -> bool, type Item = &'a mut [T];
fn exponential_group_mut(&mut self) -> ExponentialGroupMut<'_, T>ⓘNotable traits for ExponentialGroupMut<'a, T>impl<'a, T: 'a> Iterator for ExponentialGroupMut<'a, T> where
T: PartialEq, type Item = &'a mut [T];
where
T: PartialEq,
T: PartialEq, type Item = &'a mut [T];