doc.rust-lang.org
pub fn capacity(&self) -> usize
Returns the number of elements the deque can hold without reallocating.
method
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn binary_search_by_key<'a, B, F>(&'a self, b: &B, f: F) -> Result<usize, usize>
Binary searches this VecDeque with a key extraction function.
method
alloc
Stable since 1.54.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn binary_search_by<'a, F>(&'a self, f: F) -> Result<usize, usize>
Binary searches this VecDeque with a comparator function.
method
alloc
Stable since 1.54.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn binary_search(&self, x: &T) -> Result<usize, usize>
Binary searches this VecDeque for a given element. If the VecDeque is not sorted, the returned result is unspecified and meaningless.
method
alloc
Stable since 1.54.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn back_mut(&mut self) -> Option<&mut T>
Provides a mutable reference to the back element, or None if the deque is empty.
method
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn back(&self) -> Option<&T>
Provides a reference to the back element, or None if the deque is empty.
method
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn as_slices(&self) -> (&[T], &[T])
Returns a pair of slices which contain, in order, the contents of the deque.
method
alloc
Stable since 1.5.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn as_mut_slices(&mut self) -> (&mut [T], &mut [T])
Returns a pair of slices which contain, in order, the contents of the deque.
method
alloc
Stable since 1.5.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn append(&mut self, other: &mut Self)
Moves all the elements of other into self, leaving other empty.
method
alloc
Stable since 1.4.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct VecDeque<T, A>
A double-ended queue implemented with a growable ring buffer.
struct
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub mod vec_deque
A double-ended queue (deque) implemented with a growable ring buffer.
module
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn split_off(&mut self, at: usize) -> LinkedList<T, A>
Splits the list into two at the given index. Returns everything after the given index, including the index.
method
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn push_front_mut(&mut self, elt: T) -> &mut T
Adds an element to the front of the list, returning a reference to it.
method
alloc
Stable since 1.95.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn push_front(&mut self, elt: T)
Adds an element to the front of the list.
method
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn push_back_mut(&mut self, elt: T) -> &mut T
Adds an element to the back of the list, returning a reference to it.
method
alloc
Stable since 1.95.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn push_back(&mut self, elt: T)
Adds an element to the back of the list.
method
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn pop_front(&mut self) -> Option<T>
Removes the first element and returns it, or None if the list is empty.
method
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn pop_back(&mut self) -> Option<T>
Removes the last element from a list and returns it, or None if it is empty.
method
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn new() -> Self
Creates an empty LinkedList.
associated_function
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn len(&self) -> usize
Returns the length of the LinkedList.
method
alloc
Stable since 1.0.0
Version 1.100.0-nightly