pub trait Mappers: IntoIterator {
fn mapper<F, T>(self, f: F) -> Vec<T>
where
Self: Sized,
F: FnMut(Self::Item) -> T,
{ ... }
fn iterate<F>(self, f: F)
where
Self: Sized,
F: FnMut(Self::Item),
{ ... }
fn mutate<'a, T: 'a, F>(self, f: F)
where
Self: IntoIterator<Item = &'a mut T, IntoIter = IterMut<'a, T>> + Sized,
F: FnMut(&mut T),
{ ... }
fn indexed_mapper<F, T>(self, f: F) -> Vec<T>
where
Self: Sized,
F: FnMut(usize, Self::Item) -> T,
{ ... }
fn indexed_iterate<F>(self, f: F)
where
Self: Sized,
F: FnMut(usize, Self::Item),
{ ... }
fn indexed_mutate<'a, T: 'a, F>(self, f: F)
where
Self: IntoIterator<Item = &'a mut T, IntoIter = IterMut<'a, T>> + Sized,
F: FnMut(usize, &mut T),
{ ... }
}