pub struct Stack {
pub values: Vec<Value>,
pub frames: Vec<Frame>,
}Fields§
§values: Vec<Value>§frames: Vec<Frame>Implementations§
Source§impl Stack
impl Stack
pub fn new() -> Self
pub fn push(&mut self, value: Value)
pub fn pop(&mut self) -> Option<Value>
pub fn peek(&self) -> Option<&Value>
pub fn peek_mut(&mut self) -> Option<&mut Value>
pub fn size(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn clear(&mut self)
pub fn get(&self, index: StackIndex) -> Option<&Value>
pub fn set(&mut self, index: StackIndex, value: Value) -> Result<(), String>
pub fn push_frame(&mut self, frame: Frame)
pub fn pop_frame(&mut self) -> Option<Frame>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Stack
impl RefUnwindSafe for Stack
impl Send for Stack
impl Sync for Stack
impl Unpin for Stack
impl UnwindSafe for Stack
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more