[][src]Struct passerine::vm::linked::Linked

pub struct Linked(_, _);

A linked list of usizes that functions as a stack. Used to keep track of the current stack frame while preserving the indicies of past frames.


impl Linked[src]

pub fn new(index: usize) -> Linked[src]

Create a new linked stack provided the first item. A linked stack can not be empty.

pub fn prepend(&mut self, new_index: usize)[src]

Add a new entry to the top of the linked stack.

pub fn prepop(&mut self) -> usize[src]

Remove the top entry of the linked stack, returning the top value.

pub fn peek(&self) -> usize[src]

Peek at the current item on top of the stack.

Trait Implementations

impl Debug for Linked[src]

Auto Trait Implementations

impl RefUnwindSafe for Linked

impl Send for Linked

impl Sync for Linked

impl Unpin for Linked

impl UnwindSafe for Linked

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.