pub struct OperandStack {
pub values: Vec<Value>,
}Expand description
§The operand stack
StackAssembly’s evaluation model is based on an implicit stack which stores all operands.
Aside from this, the stack is an important communication channel between
script and host. Please refer to Eval’s operand_stack field for more
information on that.
Fields§
§values: Vec<Value>§The values on the stack
Implementations§
Source§impl OperandStack
impl OperandStack
Sourcepub fn pop(&mut self) -> Result<Value, OperandStackUnderflow>
pub fn pop(&mut self) -> Result<Value, OperandStackUnderflow>
§Pop a value from the top of the stack
Return OperandStackUnderflow, if no value is available on the stack,
which provides an automatic conversion to Effect.
Sourcepub fn to_i32_slice(&self) -> &[i32]
pub fn to_i32_slice(&self) -> &[i32]
§Access the stack as a slice of i32 values
Sourcepub fn to_u32_slice(&self) -> &[u32]
pub fn to_u32_slice(&self) -> &[u32]
§Access the stack as a slice of u32 values
Trait Implementations§
Source§impl Debug for OperandStack
impl Debug for OperandStack
Source§impl Default for OperandStack
impl Default for OperandStack
Source§fn default() -> OperandStack
fn default() -> OperandStack
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for OperandStack
impl RefUnwindSafe for OperandStack
impl Send for OperandStack
impl Sync for OperandStack
impl Unpin for OperandStack
impl UnsafeUnpin for OperandStack
impl UnwindSafe for OperandStack
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more