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§
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) -> Selfwhere
A: Ord,
fn to_inserted_ord(&mut self, item: A) -> Selfwhere
A: Ord,
fn to_extended<I: IntoIterator<Item = A>>(&self, iter: I) -> Selfwhere
Self: Extend<A>,
fn iter_clone(&self) -> Self::IntoIterwhere
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.