pub struct Stack {
pub s: Vec<f64>,
/* private fields */
}Expand description
Stack is a type representing a stack in *><>. It holds the stack values in s, as well as a register. The register may contain data, but will only be considered filled if filled_register is also true.
Fields§
§s: Vec<f64>Implementations§
Source§impl Stack
impl Stack
pub fn new(s: Option<Vec<f64>>) -> Stack
pub fn from_string(str_stack: &str) -> Result<Stack, Box<dyn Error>>
Sourcepub fn swap_three(&mut self)
pub fn swap_three(&mut self)
swap_three implements “@”: with [1,2,3,4], calling “@” results in [1,4,2,3].
Sourcepub fn shift_right(&mut self)
pub fn shift_right(&mut self)
shift_right implements “}”.
Sourcepub fn shift_left(&mut self)
pub fn shift_left(&mut self)
shift_left implements “{”.
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