Skip to main content

RuntimeExecutionStack

Struct RuntimeExecutionStack 

Source
pub struct RuntimeExecutionStack {
    pub values: Vec<Option<ValueContainer>>,
}

Fields§

§values: Vec<Option<ValueContainer>>

Implementations§

Source§

impl RuntimeExecutionStack

Source

pub fn new(values: Vec<ValueContainer>) -> Self

Creates a new stack with initial allocated stack values.

Source

pub fn resolve_injected_values( &mut self, injected_values: &[InjectedValueDeclaration], ) -> Result<Vec<ValueContainer>, ExecutionError>

Resolves a list of injected values to actual values on the stack

Source

pub fn take_runtime_values_with_stack_indices( &mut self, values: Vec<RuntimeValue>, ) -> Result<(Vec<ValueContainer>, Vec<Option<StackIndex>>), ExecutionError>

Resolves a list of runtime values to actual values on the stack, returning both the resolved values and their corresponding stack indices (for values stored on the stack)

Source

pub fn restore_stack_values( &mut self, values: Vec<ValueContainer>, stack_indices: Vec<Option<StackIndex>>, ) -> Result<(), ExecutionError>

Restores values to the stack at the given indices, if both the index and value are available.

Source§

impl RuntimeExecutionStack

Source

pub fn stack_dump(&self) -> MemoryDump

Returns a dump of the current stack values.

Trait Implementations§

Source§

impl Debug for RuntimeExecutionStack

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for RuntimeExecutionStack

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> DynEq for T
where T: Any,

Source§

default fn dyn_eq(&self, _other: &(dyn Any + 'static)) -> bool

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> TryClone for T

Source§

default fn try_clone(&self) -> Result<Value, ()>

Attempts to clone Self into a new Value.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T, U> TypeSubset<U> for T
where U: TypeSuperset<T>,

Source§

fn is_subset_of(&self, other: &U) -> bool

Returns whether self is a subset of type