Struct stack_graphs::arena::List[][src]

#[repr(C)]
pub struct List<T> { /* fields omitted */ }
Expand description

An arena-allocated singly-linked list.

Linked lists are often a poor choice because they aren’t very cache-friendly. However, this linked list implementation should be cache-friendly, since the individual cells are allocated out of an arena.

Implementations

Creates a new ListArena that will manage lists of this type.

Returns whether this list is empty.

Returns an empty list.

Returns a handle to the head of the list.

Pushes a new element onto the front of this list.

Removes and returns the element at the front of this list. If the list is empty, returns None.

Returns an iterator over the elements of this list.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. 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 resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.