pub enum NStack<T, A> {
    Leaf([Option<T>; 4]),
    Node([Option<Annotated<Box<NStack<T, A>>, A>>; 4]),
}

Variants

Leaf([Option<T>; 4])

Node([Option<Annotated<Box<NStack<T, A>>, A>>; 4])

Implementations

Construct a Branch pointing to the nth element, if any

Construct a BranchMut pointing to the nth element, if any

Construct a Branch pointing to the element with the largest key

Construct a BranchMut pointing to the element with the largest key

Creates a new empty NStack

Pushes a new element onto the stack

Pop an element off the stack.

Returns the popped element, if any.

Trait Implementations

Compute the annotation from the child.
Compute the annotation from the child.
Compute the annotation from the child.
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
The leaf type of the compound collection
Returns a reference to a possible child at specified index
Returns a mutable reference to a possible child at specified index
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Compute the annotation from the child.
Compute the annotation from the child.
Compute the annotation from the child.
Compute the annotation from the child.
Compute the annotation from the child.
Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Construct a Branch pointing to the first element, if not empty
Construct a BranchMut pointing to the first element, if not empty

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 resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
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.