Skip to main content

PopStack

Trait PopStack 

Source
pub trait PopStack<T> {
    // Required method
    fn pop(&mut self) -> Result<T, Report>;
}
Expand description

Low-level typed operand access, excluding protected frame locals.

To be implemented by vihaco’s execution storage. Component authors choose PopFromStack messages instead of implementing stack access. This public extension point also permits custom storage implementations.

The type parameter selects the representation: word-backed storage can decode floats, while an optimized cursor can consume native float values.

Required Methods§

Source

fn pop(&mut self) -> Result<T, Report>

Consume exactly one logical operand as T.

§Errors

Returns an error if no operand is available. Earlier successful reads remain consumed when a subsequent read fails.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§