[−][src]Struct reustmann::Interpreter
The main interpreter, execute instructions, read from input, write to output
Implementations
impl Interpreter
[src]
pub fn new(
arch_length: usize,
arch_width: usize
) -> Result<Interpreter, &'static str>
[src]
arch_length: usize,
arch_width: usize
) -> Result<Interpreter, &'static str>
Construct a new Interpreter with an existing Program.
arch_length
need to be in the range [1..2^32)
and arch_width
in [6..32)
.
pub fn copy_program(&mut self, program: &Program)
[src]
Copy your program in the memory of the machine, a reset is done after program was loaded.
pub fn arch_length(&self) -> usize
[src]
return the interpreter arch length
pub fn arch_width(&self) -> usize
[src]
return the interpreter arch width
pub fn reset(&mut self) -> Statement
[src]
Reset pc
, sp
and nz
to 0
, 0
and false
respectively.
pub fn step<R: ?Sized + Read, W: ?Sized + Write>(
&mut self,
input: &mut R,
output: &mut W
) -> Statement
[src]
&mut self,
input: &mut R,
output: &mut W
) -> Statement
pub fn debug_infos(&self) -> DebugInfos
[src]
Get a debug struct that can help for debugging programs
Auto Trait Implementations
impl RefUnwindSafe for Interpreter
[src]
impl Send for Interpreter
[src]
impl Sync for Interpreter
[src]
impl Unpin for Interpreter
[src]
impl UnwindSafe for Interpreter
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,