Trait SequenceMut

Source
pub trait SequenceMut<T> {
    // Required methods
    fn capacity(&self) -> usize;
    fn clear(&mut self);
    fn reserve(&mut self, additional: usize);
    fn reserve_exact(&mut self, additional: usize);
    fn shrink_to_fit(&mut self);
    fn push(&mut self, x: T);
    fn pop(&mut self) -> Option<T>;
    fn insert(&mut self, index: usize, x: T);
    fn remove(&mut self, index: usize) -> T;
}
Expand description

Trait for mutable collections that store elements in a linear sequence, allowing for linear traversal and indexing with an usize.

Required Methods§

Source

fn capacity(&self) -> usize

Source

fn clear(&mut self)

Source

fn reserve(&mut self, additional: usize)

Source

fn reserve_exact(&mut self, additional: usize)

Source

fn shrink_to_fit(&mut self)

Source

fn push(&mut self, x: T)

Source

fn pop(&mut self) -> Option<T>

Source

fn insert(&mut self, index: usize, x: T)

Source

fn remove(&mut self, index: usize) -> T

Implementations on Foreign Types§

Source§

impl<T> SequenceMut<T> for Vec<T>

Source§

fn capacity(&self) -> usize

Source§

fn clear(&mut self)

Source§

fn reserve(&mut self, additional: usize)

Source§

fn reserve_exact(&mut self, additional: usize)

Source§

fn shrink_to_fit(&mut self)

Source§

fn push(&mut self, x: T)

Source§

fn pop(&mut self) -> Option<T>

Source§

fn insert(&mut self, index: usize, x: T)

Source§

fn remove(&mut self, index: usize) -> T

Implementors§