doc.rust-lang.org
pub fn clear(&mut self)
Removes all elements from the LinkedList.
method
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn contains(&self, x: &T) -> bool
Returns true if the LinkedList contains an element equal to the given value.
method
alloc
Stable since 1.12.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn extract_if<F>(&mut self, filter: F) -> ExtractIf<'_, T, F, A>
Creates an iterator which uses a closure to determine if an element should be removed.
method
alloc
Stable since 1.87.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn front(&self) -> Option<&T>
Provides a reference to the front element, 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 front_mut(&mut self) -> Option<&mut T>
Provides a mutable reference to the front element, 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 is_empty(&self) -> bool
Returns true if the LinkedList is empty.
method
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn iter(&self) -> Iter<'_, T>
Provides a forward iterator.
method
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn iter_mut(&mut self) -> IterMut<'_, T>
Provides a forward iterator with mutable references.
method
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
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 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 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 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 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_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_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 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 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 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 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