Trait AsImVec

Source
pub trait AsImVec<A: Clone>: Clone {
Show 18 methods // Required methods fn push_back(&mut self, value: A); fn push_front(&mut self, value: A); fn pop_back(&mut self) -> Option<A>; fn pop_front(&mut self) -> Option<A>; fn sort_by<F: Fn(&A, &A) -> Ordering>(&mut self, cmp: F); fn insert(&mut self, index: usize, value: A); fn sort(&mut self) where A: Ord; fn insert_ord(&mut self, item: A) where A: Ord; // Provided methods fn to_pushed_back(&self, value: A) -> Self { ... } fn to_pushed_front(&self, value: A) -> Self { ... } fn to_pop_back(&self) -> (Self, Option<A>) { ... } fn to_pop_front(&self) -> (Self, Option<A>) { ... } fn to_sorted_by<F: Fn(&A, &A) -> Ordering>(&self, cmp: F) -> Self { ... } fn to_inserted(&mut self, index: usize, value: A) -> Self { ... } fn to_sorted(&self) -> Self where A: Ord { ... } fn to_inserted_ord(&mut self, item: A) -> Self where A: Ord { ... } fn to_extended<I: IntoIterator<Item = A>>(&self, iter: I) -> Self where Self: Extend<A> { ... } fn iter_clone(&self) -> Self::IntoIter where Self: IntoIterator { ... }
}

Required Methods§

Source

fn push_back(&mut self, value: A)

Source

fn push_front(&mut self, value: A)

Source

fn pop_back(&mut self) -> Option<A>

Source

fn pop_front(&mut self) -> Option<A>

Source

fn sort_by<F: Fn(&A, &A) -> Ordering>(&mut self, cmp: F)

Source

fn insert(&mut self, index: usize, value: A)

Source

fn sort(&mut self)
where A: Ord,

Source

fn insert_ord(&mut self, item: A)
where A: Ord,

Provided Methods§

Source

fn to_pushed_back(&self, value: A) -> Self

Source

fn to_pushed_front(&self, value: A) -> Self

Source

fn to_pop_back(&self) -> (Self, Option<A>)

Source

fn to_pop_front(&self) -> (Self, Option<A>)

Source

fn to_sorted_by<F: Fn(&A, &A) -> Ordering>(&self, cmp: F) -> Self

Source

fn to_inserted(&mut self, index: usize, value: A) -> Self

Source

fn to_sorted(&self) -> Self
where A: Ord,

Source

fn to_inserted_ord(&mut self, item: A) -> Self
where A: Ord,

Source

fn to_extended<I: IntoIterator<Item = A>>(&self, iter: I) -> Self
where Self: Extend<A>,

Source

fn iter_clone(&self) -> Self::IntoIter
where Self: IntoIterator,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<A: Clone> AsImVec<A> for Vector<A>

Source§

fn push_back(&mut self, value: A)

Source§

fn push_front(&mut self, value: A)

Source§

fn pop_back(&mut self) -> Option<A>

Source§

fn pop_front(&mut self) -> Option<A>

Source§

fn sort_by<F: Fn(&A, &A) -> Ordering>(&mut self, cmp: F)

Source§

fn insert(&mut self, index: usize, value: A)

Source§

fn sort(&mut self)
where A: Ord,

Source§

fn insert_ord(&mut self, item: A)
where A: Ord,

Source§

impl<A: Clone> AsImVec<A> for Vector<A>

Source§

fn push_back(&mut self, value: A)

Source§

fn push_front(&mut self, value: A)

Source§

fn pop_back(&mut self) -> Option<A>

Source§

fn pop_front(&mut self) -> Option<A>

Source§

fn sort_by<F: Fn(&A, &A) -> Ordering>(&mut self, cmp: F)

Source§

fn insert(&mut self, index: usize, value: A)

Source§

fn sort(&mut self)
where A: Ord,

Source§

fn insert_ord(&mut self, item: A)
where A: Ord,

Implementors§