pub type Segment<'a, K> = Segment<'a, K, VecDeque<<K as ClosedVecDeque>::Item>>;
Available on crate feature
alloc
only.Aliased Type§
pub struct Segment<'a, K> { /* private fields */ }
Implementations§
Source§impl<K, T> Segment<'_, K>
impl<K, T> Segment<'_, K>
pub fn split_off(&mut self, at: usize) -> VecDeque<T>
pub fn resize(&mut self, len: usize, fill: T)where
T: Clone,
pub fn resize_with<F>(&mut self, len: usize, f: F)where
F: FnMut() -> T,
pub fn truncate(&mut self, len: usize)
pub fn retain<F>(&mut self, f: F)
pub fn retain_mut<F>(&mut self, f: F)
pub fn insert(&mut self, index: usize, item: T)
pub fn insert_front(&mut self, item: T)
pub fn insert_back(&mut self, item: T)
pub fn remove(&mut self, index: usize) -> Option<T>
pub fn remove_front(&mut self) -> Option<T>
pub fn remove_back(&mut self) -> Option<T>
pub fn swap_remove_front(&mut self, index: usize) -> Option<T>
pub fn swap_remove_back(&mut self, index: usize) -> Option<T>
pub fn clear(&mut self)
pub fn len(&self) -> usize
pub fn iter(&self) -> Iter<'_, T>
pub fn iter_mut(&mut self) -> IterMut<'_, T>
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl<K, T> Extend<T> for Segment<'_, K>
impl<K, T> Extend<T> for Segment<'_, K>
Source§fn extend<I>(&mut self, items: I)where
I: IntoIterator<Item = T>,
fn extend<I>(&mut self, items: I)where
I: IntoIterator<Item = T>,
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more