pub struct VecDeque<T, A: Allocator> { /* private fields */ }Implementations§
Source§impl<T, A: Allocator> VecDeque<T, A>
impl<T, A: Allocator> VecDeque<T, A>
pub fn new_in(alloc: A) -> Self
pub fn with_capacity_in( capacity: usize, alloc: A, ) -> Result<Self, TryReserveError>
pub fn get(&self, index: usize) -> Option<&T>
pub fn get_mut(&mut self, index: usize) -> Option<&mut T>
pub fn capacity(&self) -> usize
pub fn allocator(&self) -> &A
pub fn iter(&self) -> Iter<'_, T>
pub fn iter_mut(&mut self) -> IterMut<'_, T>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn range<R>(&self, range: R) -> Iter<'_, T>where
R: RangeBounds<usize>,
pub fn range_mut<R>(&mut self, range: R) -> IterMut<'_, T>where
R: RangeBounds<usize>,
pub fn reserve(&mut self, additional: usize) -> Result<(), TryReserveError>
pub fn drain<R>(&mut self, range: R) -> Drain<'_, T, A>where
R: RangeBounds<usize>,
pub fn clear(&mut self)
pub fn contains(&self, x: &T) -> boolwhere
T: PartialEq,
pub fn front(&self) -> Option<&T>
pub fn front_mut(&mut self) -> Option<&mut T>
pub fn back(&self) -> Option<&T>
pub fn back_mut(&mut self) -> Option<&mut T>
pub fn pop_front(&mut self) -> Option<T>
pub fn pop_back(&mut self) -> Option<T>
pub fn push_front(&mut self, item: T) -> Result<(), TryReserveError>
pub fn push_back(&mut self, item: T) -> Result<(), TryReserveError>
pub fn insert(&mut self, index: usize, item: T) -> Result<(), TryReserveError>
pub fn remove(&mut self, index: usize) -> Option<T>
pub fn append(&mut self, other: &mut Self) -> Result<(), TryReserveError>
pub fn make_contiguous(&mut self) -> &mut [T]
Trait Implementations§
Auto Trait Implementations§
impl<T, A> Freeze for VecDeque<T, A>where
A: Freeze,
impl<T, A> RefUnwindSafe for VecDeque<T, A>where
A: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, A> Send for VecDeque<T, A>
impl<T, A> Sync for VecDeque<T, A>
impl<T, A> Unpin for VecDeque<T, A>
impl<T, A> UnwindSafe for VecDeque<T, A>where
A: UnwindSafe,
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more