Struct self_compare::ComparerMut
[−]
[src]
pub struct ComparerMut<'a, T: 'a> { /* fields omitted */ }
A structure for mutably comparing the elements of a slice with themselves
Methods
impl<'a, T: 'a> ComparerMut<'a, T>
[src]
fn new(list: &'a mut [T]) -> Self
[src]
Returns a ComparerMut
fn inner(&mut self) -> &mut [T]
[src]
Returns the inner mutable slice
fn indices(&self) -> (usize, usize)
[src]
Returns the indices of the next two elements to be compared
fn next(&mut self) -> Option<(&mut T, &mut T)>
[src]
Optionally returns mutable reference to two elements until all elements have been compared
fn next_enumerated(&mut self) -> Option<((usize, &mut T), (usize, &mut T))>
[src]
Same as next()
but also returns the indices of the elements