Struct intrusive_collections::linked_list::LinkedList [] [src]

pub struct LinkedList<A: Adapter<Link = Link>> { /* fields omitted */ }

An intrusive doubly-linked list.

When this collection is dropped, all elements linked into it will be converted back to owned pointers and dropped.

Methods

impl<A: Adapter<Link = Link>> LinkedList<A>
[src]

[src]

Creates an empty LinkedList.

[src]

Returns true if theLinkedList` is empty.

[src]

Returns a null Cursor for this list.

[src]

Returns a null CursorMut for this list.

[src]

Creates a Cursor from a pointer to an element.

Safety

ptr must be a pointer to an object that is part of this list.

[src]

Creates a CursorMut from a pointer to an element.

Safety

ptr must be a pointer to an object that is part of this list.

[src]

Returns a Cursor pointing to the first element of the list. If the list is empty then a null cursor is returned.

[src]

Returns a CursorMut pointing to the first element of the list. If the the list is empty then a null cursor is returned.

[src]

Returns a Cursor pointing to the last element of the list. If the list is empty then a null cursor is returned.

[src]

Returns a CursorMut pointing to the last element of the list. If the list is empty then a null cursor is returned.

[src]

Gets an iterator over the objects in the LinkedList.

[src]

Removes all elements from the LinkedList.

This will unlink all object currently in the list, which requires iterating through all elements in the LinkedList. Each element is converted back to an owned pointer and then dropped.

[src]

Empties the LinkedList without unlinking or freeing objects in it.

Since this does not unlink any objects, any attempts to link these objects into another LinkedList will fail but will not cause any memory unsafety. To unlink those objects manually, you must call the force_unlink function on them.

[src]

Takes all the elements out of the LinkedList, leaving it empty. The taken elements are returned as a new LinkedList.

[src]

Inserts a new element at the start of the LinkedList.

[src]

Inserts a new element at the end of the LinkedList.

[src]

Removes the first element of the LinkedList.

This returns None if the LinkedList is empty.

[src]

Removes the last element of the LinkedList.

This returns None if the LinkedList is empty.

Trait Implementations

impl<A: Adapter<Link = Link> + Sync> Sync for LinkedList<A> where
    A::Value: Sync
[src]

impl<A: Adapter<Link = Link> + Send> Send for LinkedList<A> where
    A::Pointer: Send
[src]

impl<A: Adapter<Link = Link>> Drop for LinkedList<A>
[src]

[src]

Executes the destructor for this type. Read more

impl<A: Adapter<Link = Link>> IntoIterator for LinkedList<A>
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

[src]

Creates an iterator from a value. Read more

impl<'a, A: Adapter<Link = Link> + 'a> IntoIterator for &'a LinkedList<A>
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

[src]

Creates an iterator from a value. Read more

impl<A: Adapter<Link = Link> + Default> Default for LinkedList<A>
[src]

[src]

Returns the "default value" for a type. Read more

impl<A: Adapter<Link = Link>> Debug for LinkedList<A> where
    A::Value: Debug
[src]

[src]

Formats the value using the given formatter.