rune::core::env::stack

Struct RootedLispStack

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

Automatically derived from LispStack via #[derive(Trace)]

Fields§

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

Implementations§

Source§

impl<'a> RootedLispStack<'a>

Source

pub(crate) fn push_bytecode_frame( &mut self, start: usize, depth: usize, func: &ByteFn, pc: usize, )

Source

pub(crate) fn push_frame(&mut self, arg_cnt: usize)

Source

pub(crate) fn pop_frame(&mut self)

Remove all the stack variables in the current frame and switch to the previous one

Source

pub(crate) fn get_bytecode_frame( &self, idx: usize, ) -> Option<(&Rt<Slot<&'a ByteFn>>, usize)>

Source

pub(crate) fn prev_bytecode_frame( &self, ) -> Option<(&Rt<Slot<&'a ByteFn>>, usize)>

Source

pub(crate) fn current_frame(&self) -> usize

Source

pub(crate) fn unwind_frames(&mut self, frame: usize)

Source

pub(crate) fn len(&self) -> usize

Source

pub(crate) fn set_depth(&mut self, depth: usize)

Source

pub(crate) fn set_arg_count(&mut self, arg_cnt: u16, rest: bool)

Source

pub(crate) fn push<T: IntoRoot<Slot<Gc<ObjectType<'a>>>>>(&mut self, value: T)

Source

pub(crate) fn pop<'ob>(&mut self, cx: &'ob Context<'_>) -> Gc<ObjectType<'ob>>

Source

pub(crate) fn top(&mut self) -> &mut Rt<Slot<Gc<ObjectType<'a>>>>

Source

pub(crate) fn offset_end(&self, i: usize) -> usize

Source

pub(crate) fn push_ref(&mut self, i: impl Into<i32>, cx: &Context<'_>)

Source

pub(crate) fn set_ref(&mut self, i: impl Into<usize>)

Source

pub(crate) fn fill_extra_args(&mut self, fill_args: u16)

Source

pub(crate) fn remove_top(&mut self, i: usize)

Source

pub(crate) fn truncate(&mut self, len: usize)

Source

pub(crate) fn extend_from_slice(&mut self, src: &[Gc<ObjectType<'_>>])

Source

pub(crate) fn extend_as_vec_from_within(&mut self, src: impl RangeBounds<usize>)

Source

pub(crate) fn frames<'b>(&'b self) -> &'b [Rt<Slot<Gc<ObjectType<'a>>>>]

Source

pub(crate) fn arg_count(&self) -> usize

Source

pub(crate) fn current_args(&self) -> &[Rt<Slot<Gc<ObjectType<'a>>>>]

Source

pub(crate) fn arg_slice( &self, arg_slice: ArgSlice, ) -> &[Rt<Slot<Gc<ObjectType<'a>>>>]

Trait Implementations§

Source§

impl<'a> Index<RangeTo<usize>> for RootedLispStack<'a>

Source§

type Output = [Rt<Slot<Gc<ObjectType<'a>>>>]

The returned type after indexing.
Source§

fn index(&self, index: RangeTo<usize>) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl<'a> Index<usize> for RootedLispStack<'a>

Source§

type Output = Rt<Slot<Gc<ObjectType<'a>>>>

The returned type after indexing.
Source§

fn index(&self, index: usize) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl IndexMut<usize> for RootedLispStack<'_>

Source§

fn index_mut(&mut self, index: usize) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for RootedLispStack<'a>

§

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

§

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

§

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

§

impl<'a> !Unpin for RootedLispStack<'a>

§

impl<'a> !UnwindSafe for RootedLispStack<'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.