Trait Interpreter
Source pub trait Interpreter<TCommand> {
type ErrorType;
// Required methods
fn execute(
&mut self,
resid: usize,
cmd: TCommand,
) -> Result<(), Self::ErrorType>;
fn progress(
&mut self,
curcmd: usize,
maxcmd: usize,
) -> Result<(), Self::ErrorType>;
}
Execute a command
§Arguments
resid
- Resource id of the command to be processed
cmd
- The command to execute
Called to let a chance to handle execution progress
§Arguments
curcmd
- Current number of commands executed
maxcmd
- Maximum number of commands to execute