Trait enso_flexer::prelude::logger::prelude::VecOps [−][src]
pub trait VecOps { type Item; fn push_and_get(&mut self, item: Self::Item) -> &Self::Item; fn push_and_get_mut(&mut self, item: Self::Item) -> &mut Self::Item; fn extended<I>(self, iter: I) -> Self
where
I: IntoIterator<Item = Self::Item>; fn pushed(self, item: Self::Item) -> Self; fn reversed(self) -> Self; fn remove_item(&mut self, item: &Self::Item) -> Option<Self::Item>
where
Self::Item: PartialEq<Self::Item>; }
Associated Types
Loading content...Required methods
fn push_and_get(&mut self, item: Self::Item) -> &Self::Item
[src]
Expand description
Pushes the provided item
onto the std::vec::Vec
, and then returns an immutable
reference to the item.
fn push_and_get_mut(&mut self, item: Self::Item) -> &mut Self::Item
[src]
Expand description
Pushes the provided item
onto the std::vec::Vec
, and then returns a mutable reference
to the item.
fn extended<I>(self, iter: I) -> Self where
I: IntoIterator<Item = Self::Item>,
[src]
I: IntoIterator<Item = Self::Item>,
Expand description
Extend the vector with the provided iter
.
fn pushed(self, item: Self::Item) -> Self
[src]
Expand description
Push element to the vector.
fn reversed(self) -> Self
[src]
Expand description
Self but reversed.
fn remove_item(&mut self, item: &Self::Item) -> Option<Self::Item> where
Self::Item: PartialEq<Self::Item>,
[src]
Self::Item: PartialEq<Self::Item>,
Expand description
Remove first element equal to item
and returns it if any.
Implementations on Foreign Types
impl<T> VecOps for Vec<T, Global>
[src]
impl<T> VecOps for Vec<T, Global>
[src]type Item = T
pub fn push_and_get(
&mut self,
item: <Vec<T, Global> as VecOps>::Item
) -> &<Vec<T, Global> as VecOps>::Itemⓘ
[src]
&mut self,
item: <Vec<T, Global> as VecOps>::Item
) -> &<Vec<T, Global> as VecOps>::Itemⓘ
pub fn push_and_get_mut(
&mut self,
item: <Vec<T, Global> as VecOps>::Item
) -> &mut <Vec<T, Global> as VecOps>::Itemⓘ
[src]
&mut self,
item: <Vec<T, Global> as VecOps>::Item
) -> &mut <Vec<T, Global> as VecOps>::Itemⓘ
pub fn extended<I>(self, iter: I) -> Vec<T, Global>ⓘ where
I: IntoIterator<Item = <Vec<T, Global> as VecOps>::Item>,
[src]
I: IntoIterator<Item = <Vec<T, Global> as VecOps>::Item>,
pub fn pushed(self, item: <Vec<T, Global> as VecOps>::Item) -> Vec<T, Global>ⓘ
[src]
pub fn reversed(self) -> Vec<T, Global>ⓘ
[src]
pub fn remove_item(&mut self, item: &T) -> Option<T> where
T: PartialEq<T>,
[src]
T: PartialEq<T>,