pub trait LoopControl {
// Required methods
fn is_not_end(&self) -> bool;
fn reset_action(&mut self);
fn set_action(&mut self, action: InterpreterAction);
fn action(&mut self) -> &mut Option<InterpreterAction>;
// Provided methods
fn is_end(&self) -> bool { ... }
fn instruction_result(&mut self) -> Option<InstructionResult> { ... }
}
Expand description
Trait controls execution of the loop.
Required Methods§
Sourcefn is_not_end(&self) -> bool
fn is_not_end(&self) -> bool
Returns true
if the loop should continue.
Sourcefn reset_action(&mut self)
fn reset_action(&mut self)
Sets the end
flag internally. Action should be taken after.
Sourcefn set_action(&mut self, action: InterpreterAction)
fn set_action(&mut self, action: InterpreterAction)
Set return action.
Sourcefn action(&mut self) -> &mut Option<InterpreterAction>
fn action(&mut self) -> &mut Option<InterpreterAction>
Returns the current action.
Provided Methods§
Sourcefn instruction_result(&mut self) -> Option<InstructionResult>
fn instruction_result(&mut self) -> Option<InstructionResult>
Returns instruction result