pub struct List<G: GetLinksWrapped> { /* private fields */ }
Expand description

A linked list.

Elements in the list are wrapped and ownership is transferred to the list while the element is in the list.

Implementations

Constructs a new empty linked list.

Returns whether the list is empty.

Adds the given object to the end (back) of the list.

It is dropped if it’s already on this (or another) list; this can happen for reference-counted objects, so dropping means decrementing the reference count.

Inserts the given object after existing.

It is dropped if it’s already on this (or another) list; this can happen for reference-counted objects, so dropping means decrementing the reference count.

Safety

Callers must ensure that existing points to a valid entry that is on the list.

Removes the given entry.

Safety

Callers must ensure that data is either on this list or in no list. It being on another list leads to memory unsafety.

Removes the element currently at the front of the list and returns it.

Returns None if the list is empty.

Returns a cursor starting on the first (front) element of the list.

Returns a mutable cursor starting on the first (front) element of the list.

Trait Implementations

Returns the “default value” for a type. Read more
Executes the destructor for this type. 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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.
This documentation is an old archive. Please see https://rust.docs.kernel.org instead.