pub enum BrainfuckInstr {
}
Expand description
Type representing a standard or virtual Brainfuck instruction.
Variants§
PointerDec
Move the data pointer back one cell.
PointerInc
Move the data pointer forward one cell.
DataDec
Decrement the value of the current memory cell.
DataInc
Increment the value of the current memory cell.
GetByte
Get a byte from the standard input and store it in the current memory cell.
PutByte
Write the current memory cell’s value to the standard output.
WhileNonzero
Begin a while loop conditional on the current value not being zero.
EndWhile
Close the while loop.
PointerSub(u16)
Subtract from the pointer.
PointerAdd(u16)
Add to the pointer.
DataSub(u8)
Subtract from the current numer.
DataAdd(u8)
Add to the current number.
Print(u16)
Print a number of bytes to the standard output at once.
Trait Implementations§
Source§impl Clone for BrainfuckInstr
impl Clone for BrainfuckInstr
Source§fn clone(&self) -> BrainfuckInstr
fn clone(&self) -> BrainfuckInstr
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for BrainfuckInstr
impl Debug for BrainfuckInstr
Source§impl PartialEq for BrainfuckInstr
impl PartialEq for BrainfuckInstr
impl StructuralPartialEq for BrainfuckInstr
Auto Trait Implementations§
impl Freeze for BrainfuckInstr
impl RefUnwindSafe for BrainfuckInstr
impl Send for BrainfuckInstr
impl Sync for BrainfuckInstr
impl Unpin for BrainfuckInstr
impl UnwindSafe for BrainfuckInstr
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