pub struct EtableInterpreter<'etable, ES: EtableSet> { /* private fields */ }
Implementations§
Source§impl<'etable, ES> EtableInterpreter<'etable, ES>where
ES: EtableSet,
impl<'etable, ES> EtableInterpreter<'etable, ES>where
ES: EtableSet,
pub fn new(machine: Machine<ES::State>, etable: &'etable ES) -> Self
pub fn deconstruct(self) -> Machine<ES::State>
Sourcepub fn inspect(&self) -> Option<(Opcode, &Stack)>
pub fn inspect(&self) -> Option<(Opcode, &Stack)>
Inspect the machine’s next opcode and current stack.
Sourcepub fn perform<R, F: FnOnce(&mut Self) -> Result<R, ExitError>>(
&mut self,
f: F,
) -> Result<R, ExitError>
pub fn perform<R, F: FnOnce(&mut Self) -> Result<R, ExitError>>( &mut self, f: F, ) -> Result<R, ExitError>
Perform any operation. If the operation fails, then set the machine status to already exited.
Sourcepub fn peek_opcode(&self) -> Option<Opcode>
pub fn peek_opcode(&self) -> Option<Opcode>
Pick the next opcode.
pub fn advance(&mut self)
Trait Implementations§
Source§impl<'etable, ES: EtableSet> AsMachine for EtableInterpreter<'etable, ES>
impl<'etable, ES: EtableSet> AsMachine for EtableInterpreter<'etable, ES>
Source§impl<'etable, ES: EtableSet> AsMachineMut for EtableInterpreter<'etable, ES>
impl<'etable, ES: EtableSet> AsMachineMut for EtableInterpreter<'etable, ES>
fn as_machine_mut(&mut self) -> &mut Machine<Self::State>
Source§impl<'etable, ES: EtableSet> Deref for EtableInterpreter<'etable, ES>
impl<'etable, ES: EtableSet> Deref for EtableInterpreter<'etable, ES>
Source§impl<'etable, ES: EtableSet> DerefMut for EtableInterpreter<'etable, ES>
impl<'etable, ES: EtableSet> DerefMut for EtableInterpreter<'etable, ES>
Source§impl<'etable, H, ES: EtableSet<Handle = H>> FeedbackInterpreter<H, CallFeedback> for EtableInterpreter<'etable, ES>
impl<'etable, H, ES: EtableSet<Handle = H>> FeedbackInterpreter<H, CallFeedback> for EtableInterpreter<'etable, ES>
Source§impl<'etable, H, ES: EtableSet<Handle = H>> FeedbackInterpreter<H, CreateFeedback> for EtableInterpreter<'etable, ES>
impl<'etable, H, ES: EtableSet<Handle = H>> FeedbackInterpreter<H, CreateFeedback> for EtableInterpreter<'etable, ES>
Source§impl<'etable, H, ES: EtableSet<Handle = H>> Interpreter<H> for EtableInterpreter<'etable, ES>
impl<'etable, H, ES: EtableSet<Handle = H>> Interpreter<H> for EtableInterpreter<'etable, ES>
type State = <ES as EtableSet>::State
type Trap = <ES as EtableSet>::Trap
fn deconstruct(self) -> (ES::State, Vec<u8>)
fn state(&self) -> &Self::State
fn state_mut(&mut self) -> &mut Self::State
fn run(&mut self, handle: &mut H) -> Capture<ExitResult, Self::Trap>
Source§impl<'etable, H, ES: EtableSet<Handle = H>> StepInterpreter<H> for EtableInterpreter<'etable, ES>
impl<'etable, H, ES: EtableSet<Handle = H>> StepInterpreter<H> for EtableInterpreter<'etable, ES>
Auto Trait Implementations§
impl<'etable, ES> Freeze for EtableInterpreter<'etable, ES>
impl<'etable, ES> RefUnwindSafe for EtableInterpreter<'etable, ES>
impl<'etable, ES> !Send for EtableInterpreter<'etable, ES>
impl<'etable, ES> !Sync for EtableInterpreter<'etable, ES>
impl<'etable, ES> Unpin for EtableInterpreter<'etable, ES>
impl<'etable, ES> UnwindSafe for EtableInterpreter<'etable, ES>
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