pub trait Interpreter<G, R, D, S, T, O, const C: usize>where
G: SyncActuatorGroup<T, C>,
R: Robot<G, T, C>,
D: Descriptor<C>,
T: SyncActuator + DefinedActuator + ?Sized + 'static,{
// Required method
fn interpret(
&self,
rob: &mut R,
desc: &mut D,
stat: &mut S,
code: &str,
) -> Vec<O>;
// Provided method
fn interpret_file(
&self,
rob: &mut R,
desc: &mut D,
stat: &mut S,
path: &str,
) -> Vec<O> { ... }
}Expand description
Interpreters convert a string prompt into actions for the robot