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

pub struct LinkedList<A: Adapter> where
    A::LinkOps: LinkedListOps
{ /* fields omitted */ }
Expand description

An intrusive doubly-linked list.

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

Implementations

Creates an empty LinkedList.

Returns true if the LinkedList is empty.

Returns a null Cursor for this list.

Returns a null CursorMut for this list.

Creates a Cursor from a pointer to an element.

Safety

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

Creates a CursorMut from a pointer to an element.

Safety

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

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

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

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

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

Gets an iterator over the objects in the LinkedList.

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.

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.

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

Inserts a new element at the start of the LinkedList.

Inserts a new element at the end of the LinkedList.

Removes the first element of the LinkedList.

This returns None if the LinkedList is empty.

Removes the last element of the LinkedList.

This returns None if the LinkedList is empty.

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Executes the destructor for this type. Read more

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

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

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.