Trait retain_mut::RetainMut [−][src]
Trait that provides retain_mut
method.
Required methods
fn retain_mut<F>(&mut self, f: F) where
F: FnMut(&mut T) -> bool,
[src]
F: FnMut(&mut T) -> bool,
Retains only the elements specified by the predicate.
In other words, remove all elements e
such that f(&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.
Implementations on Foreign Types
impl<T> RetainMut<T> for Vec<T>
[src]
fn retain_mut<F>(&mut self, f: F) where
F: FnMut(&mut T) -> bool,
[src]
F: FnMut(&mut T) -> bool,
impl<T> RetainMut<T> for VecDeque<T>
[src]
fn retain_mut<F>(&mut self, f: F) where
F: FnMut(&mut T) -> bool,
[src]
F: FnMut(&mut T) -> bool,