Trait odds::vec::VecFindRemove
[−]
[src]
pub trait VecFindRemove { type Item; fn find_remove<U>(&mut self, elt: &U) -> Option<(usize, Self::Item)>
where
Self::Item: PartialEq<U>; fn rfind_remove<U>(&mut self, elt: &U) -> Option<(usize, Self::Item)>
where
Self::Item: PartialEq<U>; }
Associated Types
type Item
Required Methods
fn find_remove<U>(&mut self, elt: &U) -> Option<(usize, Self::Item)> where
Self::Item: PartialEq<U>,
Self::Item: PartialEq<U>,
Linear search for the first element equal to elt
and remove
it if found.
Return its index and the value itself.
fn rfind_remove<U>(&mut self, elt: &U) -> Option<(usize, Self::Item)> where
Self::Item: PartialEq<U>,
Self::Item: PartialEq<U>,
Linear search for the last element equal to elt
and remove
it if found.
Return its index and the value itself.
Implementors
impl<T> VecFindRemove for Vec<T>