[−][src]Struct passerine::vm::linked::Linked
A linked list of usize
s that functions as a stack.
Used to keep track of the current stack frame while preserving
the indicies of past frames.
Implementations
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
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,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,