Struct comp_sci::data_structures::doubly_linked_list::DoublyLinkedList
[-]
[+]
[src]
pub struct DoublyLinkedList<A> {
// some fields omitted
}An implementation of a doubly linked list.
Methods
impl<A> DoublyLinkedList<A>
fn new() -> DoublyLinkedList<A>
fn push_front(&mut self, value: A)
fn push_back(&mut self, value: A)
fn iter(&self) -> Iter<A>
Provides a forward iterator.
fn first(&self) -> Option<&A>
Retrieves the first element.
fn last(&self) -> Option<&A>
Retrieves the last element.
fn is_empty(&self) -> bool
Returns whether there are any elements in the list.
fn length(&self) -> usize
Returns the length for this list.
fn clear(&mut self)
Removes all elements from the list.
This operation is O(n).