Struct runestick::Stack[][src]

pub struct Stack { /* fields omitted */ }
Expand description

The stack of the virtual machine, where all values are stored.

Implementations

Construct a new stack.

Extend the current stack.

Get the offset that corresponds to the top of the stack right now.

Construct a new stack with the given capacity.

Clear the current stack.

Get the given slice of the stack, if it isn’t out of range.

Peek the top of the stack.

Get the last position on the stack.

Access the value at the given frame offset.

Peek the value at the given offset from the top.

Get the offset at the given location.

Push a value onto the stack.

Pop a reference to a value from the stack.

Address a value on the stack.

Address a value on the stack.

Pop the given number of elements from the stack.

Test if the stack is empty.

Get the length of the stack.

Iterate over the stack.

Pop a sequence of values from the stack.

Drain the top count elements of the stack in the order that they were pushed, from bottom to top.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Creates a value from an iterator. 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.