Struct rail_lang::v1::rail_machine::Stack
source · pub struct Stack {
pub values: Vector<RailVal>,
}
Fields§
§values: Vector<RailVal>
Implementations§
source§impl Stack
impl Stack
pub fn new(values: Vector<RailVal>) -> Self
pub fn of(value: RailVal) -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn reverse(&self) -> Stack
pub fn push(self, term: RailVal) -> Stack
pub fn pop(self) -> (RailVal, Stack)
pub fn pop_bool(self, context: &str) -> (bool, Stack)
pub fn pop_i64(self, context: &str) -> (i64, Stack)
pub fn pop_f64(self, context: &str) -> (f64, Stack)
pub fn pop_quote(self, context: &str) -> (RailState, Stack)
pub fn pop_stab(self, context: &str) -> (Stab, Stack)
pub fn pop_stab_entry(self, context: &str) -> (String, RailVal, Stack)
pub fn pop_string(self, context: &str) -> (String, Stack)
pub fn enqueue(self, value: RailVal) -> Stack
pub fn dequeue(self) -> (RailVal, Stack)
Trait Implementations§
Auto Trait Implementations§
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