pub trait EventWithCommands {
// Required methods
fn commands(&self) -> &[Command];
fn commands_mut(&mut self) -> &mut Vec<Command>;
fn to_string_cmd(&self, version: Version) -> Option<String>;
// Provided methods
fn try_push_cmd(
&mut self,
cmd: Command,
indentation: usize,
) -> Result<(), CommandPushError> { ... }
fn to_string_variables(
&self,
version: Version,
variables: &[Variable],
) -> Option<String> { ... }
}Required Methods§
fn commands(&self) -> &[Command]
fn commands_mut(&mut self) -> &mut Vec<Command>
Sourcefn to_string_cmd(&self, version: Version) -> Option<String>
fn to_string_cmd(&self, version: Version) -> Option<String>
Returns the command as a String.
- Instead of making the command into a string using
DisplayorVersionedToString, use this to get the command as a string.