Trait rg3d_core::VecExtensions [−][src]
pub trait VecExtensions<T> {
fn retain_mut_ext<F>(&mut self, f: F)
where
F: FnMut(&mut T) -> bool;
}
Required methods
fn retain_mut_ext<F>(&mut self, f: F) where
F: FnMut(&mut T) -> bool,
fn retain_mut_ext<F>(&mut self, f: F) where
F: FnMut(&mut T) -> bool,
Retains only the elements specified by the predicate.
In other words, remove all elements e
such that f(&mut e)
returns false
.
This method operates in place, visiting each element exactly once in the
original order, and preserves the order of the retained elements.
Notes
This method is the copy of retain
method of Vec, but with ability to
modify each element.