Struct linked_list::LinkedList [] [src]

pub struct LinkedList<T> { /* fields omitted */ }

An experimental rewrite of LinkedList to provide a more cursor-oriented API.

Methods

impl<T> LinkedList<T>
[src]

Makes a new LinkedList.

Appends an element to the back of the list.

Appends an element to the front of the list.

Removes the element at back of the list. Returns None if the list is empty.

Removes the element at front of the list. Returns None if the list is empty.

Gets the element at the front of the list, or None if empty.

Gets the element at the back of the list, or None if empty.

Gets the element at the front of the list mutably, or None if empty.

Gets the element at the back of the list mutably, or None if empty.

Inserts an element at the given index.

Panics

Panics if the index is greater than the length of the list.

Removes the element at the given index. Returns None if the index is out of bounds.

Splits the list into two lists at the given index. Returns the right side of the split. Returns an empty list if index is out of bounds.

Appends the given list to the end of this one. The old list will be empty afterwards.

Inserts the given list at the given index. The old list will be empty afterwards.

Gets the number of elements in the list.

Whether the list is empty.

Removes all elements from the list.

Gets a cursor over the list.

Provides a forward iterator.

Provides a forward iterator with mutable references.

Consumes the list into an iterator yielding elements by value.

Trait Implementations

impl<T> Drop for LinkedList<T>
[src]

A method called when the value goes out of scope. Read more

impl<A> FromIterator<A> for LinkedList<A>
[src]

Creates a value from an iterator. Read more

impl<A> Extend<A> for LinkedList<A>
[src]

Extends a collection with the contents of an iterator. Read more

impl<A: PartialEq> PartialEq for LinkedList<A>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<A: Eq> Eq for LinkedList<A>
[src]

impl<A: PartialOrd> PartialOrd for LinkedList<A>
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<A: Ord> Ord for LinkedList<A>
[src]

This method returns an Ordering between self and other. Read more

impl<A: Debug> Debug for LinkedList<A>
[src]

Formats the value using the given formatter.

impl<A: Hash> Hash for LinkedList<A>
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl<T: Clone> Clone for LinkedList<T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'a, T> IntoIterator for &'a LinkedList<T>
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

impl<'a, T> IntoIterator for &'a mut LinkedList<T>
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

impl<T> IntoIterator for LinkedList<T>
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more