pub struct Interpreter<'a, I, O>{ /* private fields */ }
Expand description
The struct containing the data for interpretting brainfuck code
Implementations§
Source§impl<'a, I, O> Interpreter<'a, I, O>
impl<'a, I, O> Interpreter<'a, I, O>
Sourcepub fn new(program: &str, input: &'a mut I, output: &'a mut O) -> Self
pub fn new(program: &str, input: &'a mut I, output: &'a mut O) -> Self
Create a new interpreter from a program, an input object, and an output object
Examples found in repository?
More examples
Sourcepub fn run(&mut self)
pub fn run(&mut self)
Execute the program. This can be done over and over again, the interpreter is reset each time. HOWEVER: State kept within your input and output objects CANNOT be reset!!! This only resets the interpreter’s internal state before execution!!!!
Examples found in repository?
More examples
Auto Trait Implementations§
impl<'a, I, O> Freeze for Interpreter<'a, I, O>
impl<'a, I, O> RefUnwindSafe for Interpreter<'a, I, O>where
I: RefUnwindSafe,
O: RefUnwindSafe,
impl<'a, I, O> Send for Interpreter<'a, I, O>
impl<'a, I, O> Sync for Interpreter<'a, I, O>
impl<'a, I, O> Unpin for Interpreter<'a, I, O>
impl<'a, I, O> !UnwindSafe for Interpreter<'a, I, O>
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