Trait enso_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: IntoIterator<Item = Self::Item>>(self, iter: I) -> Self;
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

Required methods

fn push_and_get(&mut self, item: Self::Item) -> &Self::Item[src]

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]

Pushes the provided item onto the std::vec::Vec, and then returns a mutable reference to the item.

fn extended<I: IntoIterator<Item = Self::Item>>(self, iter: I) -> Self[src]

Extend the vector with the provided iter.

fn pushed(self, item: Self::Item) -> Self[src]

Push element to the vector.

fn reversed(self) -> Self[src]

Self but reversed.

fn remove_item(&mut self, item: &Self::Item) -> Option<Self::Item> where
    Self::Item: PartialEq<Self::Item>, 
[src]

Remove first element equal to item and returns it if any.

Implementations on Foreign Types

impl<T> VecOps for Vec<T>[src]

type Item = T

fn push_and_get(&mut self, item: Self::Item) -> &Self::Item[src]

fn push_and_get_mut(&mut self, item: Self::Item) -> &mut Self::Item[src]

fn extended<I: IntoIterator<Item = Self::Item>>(self, iter: I) -> Self[src]

fn pushed(self, item: Self::Item) -> Self[src]

fn reversed(self) -> Self[src]

fn remove_item(&mut self, item: &T) -> Option<T> where
    T: PartialEq<T>, 
[src]

Implementors