[][src]Struct rc_dlist_deque::dlist::List

pub struct List<N, S> where
    S: Selector<Node = N>, 
{ /* fields omitted */ }

The general list type.

Use List1 if each node only needs to be on one list a time.

struct List<N, S> where S : Selector<Node=N>

Methods

impl<N, S: Selector<Node = N>> List<N, S>[src]

pub fn new() -> Self[src]

pub fn is_empty(&self) -> bool[src]

pub fn first_last(&self, tail: bool) -> Cursor<N, S>[src]

Get Some pointer to the first or last element, or None if the list is empty.

pub fn first(&self) -> Cursor<N, S>[src]

pub fn last(&self) -> Cursor<N, S>[src]

Important traits for ListIterator<N, S>
pub fn iter(&self) -> ListIterator<N, S>[src]

pub fn insert(
    &mut self,
    new_entry: &Pointer<N, S>,
    location: &Pointer<N, S>,
    after: bool
)
[src]

Inserts new_entry into self before or after locaation.

Panics, or tangles the list(s):

new_entry must not be on any list.

location must be on self (and not on some other list).

pub fn push_at(&mut self, new_entry: &Pointer<N, S>, tail: bool)[src]

Inserts new_entry at the start or end of the list.

Panics, or tangles the list(s):

new_entry must not be on any list.

pub fn push_front(&mut self, n: &Pointer<N, S>)[src]

pub fn push_back(&mut self, n: &Pointer<N, S>)[src]

pub fn pop_at(&mut self, tail: bool) -> Cursor<N, S>[src]

Removes the entry at the start or end of the list, returning None if the list is empty.

pub fn pop_front(&mut self) -> Cursor<N, S>[src]

pub fn pop_back(&mut self) -> Cursor<N, S>[src]

pub fn remove(&mut self, item: &Pointer<N, S>)[src]

Removes item.

Panics, or tangles the list:

item must be on self.

pub fn clear(&mut self)[src]

Trait Implementations

impl<N, S: Selector<Node = N>> Default for List<N, S>[src]

impl<N, S: Selector<Node = N>> Drop for List<N, S>[src]

impl<'l, N, S: Selector<Node = N>> IntoIterator for &'l List<N, S>[src]

type Item = Pointer<N, S>

The type of the elements being iterated over.

type IntoIter = ListIterator<N, S>

Which kind of iterator are we turning this into?

Auto Trait Implementations

impl<N, S> !RefUnwindSafe for List<N, S>

impl<N, S> !Send for List<N, S>

impl<N, S> !Sync for List<N, S>

impl<N, S> Unpin for List<N, S> where
    S: Unpin

impl<N, S> UnwindSafe for List<N, S> where
    N: RefUnwindSafe,
    S: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.