rune::core::env::stack

Struct LispStack

Source
pub(crate) struct LispStack<'a> {
    vec: Vec<Slot<Gc<ObjectType<'a>>>>,
    current: Frame,
    frames: Vec<FrameStore<'a>>,
}
Expand description

The stack of lisp objects used to pass and store arguments in the bytecode VM and interpreter. The top of the stack is index 0 and all indexing functions operate from top to bottom. The stack is partitioned into frames. Each frame represents a function call and it’s arguments. The API is designed so that code cannot access elements outside of their frame (doing so results in a panic). Frames are added and removed with push_frame and pop_frame respectively.

Fields§

§vec: Vec<Slot<Gc<ObjectType<'a>>>>§current: Frame§frames: Vec<FrameStore<'a>>

Trait Implementations§

Source§

impl<'a> Default for LispStack<'a>

Source§

fn default() -> LispStack<'a>

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

impl<'a> RootedDeref for LispStack<'a>

Source§

type Target = RootedLispStack<'a>

Source§

fn rooted_deref(rooted: &Rt<Self>) -> &Self::Target

Source§

fn rooted_derefmut(rooted: &mut Rt<Self>) -> &mut Self::Target

Source§

impl<'a> Trace for LispStack<'a>

Source§

fn trace(&self, state: &mut GcState)

Source§

impl<'a> Debug for LispStack<'a>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for LispStack<'a>

§

impl<'a> !RefUnwindSafe for LispStack<'a>

§

impl<'a> !Send for LispStack<'a>

§

impl<'a> !Sync for LispStack<'a>

§

impl<'a> Unpin for LispStack<'a>

§

impl<'a> !UnwindSafe for LispStack<'a>

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, 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.