pub trait ClapModel {
// Required methods
fn do_compute(&mut self, arg_matches: &ArgMatches<'_>);
fn do_clap_agents(
&mut self,
arg_matches: &ArgMatches<'_>,
stdout: &mut dyn Write,
) -> bool;
fn do_clap_conditions(
&mut self,
arg_matches: &ArgMatches<'_>,
stdout: &mut dyn Write,
) -> bool;
fn do_clap_compute(
&mut self,
arg_matches: &ArgMatches<'_>,
stdout: &mut dyn Write,
) -> bool;
fn do_clap_configurations(
&mut self,
arg_matches: &ArgMatches<'_>,
stdout: &mut dyn Write,
) -> bool;
fn do_clap_transitions(
&mut self,
arg_matches: &ArgMatches<'_>,
stdout: &mut dyn Write,
) -> bool;
fn do_clap_path(
&mut self,
arg_matches: &ArgMatches<'_>,
stdout: &mut dyn Write,
) -> bool;
fn do_clap_sequence(
&mut self,
arg_matches: &ArgMatches<'_>,
stdout: &mut dyn Write,
) -> bool;
fn do_clap_states(
&mut self,
arg_matches: &ArgMatches<'_>,
stdout: &mut dyn Write,
) -> bool;
// Provided method
fn do_clap(&mut self, arg_matches: &ArgMatches<'_>, stdout: &mut dyn Write) { ... }
}Expand description
Execute operations on a model using clap commands.
Required Methods§
Sourcefn do_compute(&mut self, arg_matches: &ArgMatches<'_>)
fn do_compute(&mut self, arg_matches: &ArgMatches<'_>)
Compute the model.
Sourcefn do_clap_agents(
&mut self,
arg_matches: &ArgMatches<'_>,
stdout: &mut dyn Write,
) -> bool
fn do_clap_agents( &mut self, arg_matches: &ArgMatches<'_>, stdout: &mut dyn Write, ) -> bool
Execute the agents clap subcommand, if requested to.
This doesn’t compute the model.
Sourcefn do_clap_conditions(
&mut self,
arg_matches: &ArgMatches<'_>,
stdout: &mut dyn Write,
) -> bool
fn do_clap_conditions( &mut self, arg_matches: &ArgMatches<'_>, stdout: &mut dyn Write, ) -> bool
Execute the conditions clap subcommand, if requested to.
This doesn’t compute the model.
Sourcefn do_clap_compute(
&mut self,
arg_matches: &ArgMatches<'_>,
stdout: &mut dyn Write,
) -> bool
fn do_clap_compute( &mut self, arg_matches: &ArgMatches<'_>, stdout: &mut dyn Write, ) -> bool
Only compute the model (no output).
Sourcefn do_clap_configurations(
&mut self,
arg_matches: &ArgMatches<'_>,
stdout: &mut dyn Write,
) -> bool
fn do_clap_configurations( &mut self, arg_matches: &ArgMatches<'_>, stdout: &mut dyn Write, ) -> bool
Execute the configurations clap subcommand, if requested to.
This computes the model.
Sourcefn do_clap_transitions(
&mut self,
arg_matches: &ArgMatches<'_>,
stdout: &mut dyn Write,
) -> bool
fn do_clap_transitions( &mut self, arg_matches: &ArgMatches<'_>, stdout: &mut dyn Write, ) -> bool
Execute the transitions clap subcommand, if requested to.
This computes the model.
Sourcefn do_clap_path(
&mut self,
arg_matches: &ArgMatches<'_>,
stdout: &mut dyn Write,
) -> bool
fn do_clap_path( &mut self, arg_matches: &ArgMatches<'_>, stdout: &mut dyn Write, ) -> bool
Execute the path clap subcommand, if requested to.
Sourcefn do_clap_sequence(
&mut self,
arg_matches: &ArgMatches<'_>,
stdout: &mut dyn Write,
) -> bool
fn do_clap_sequence( &mut self, arg_matches: &ArgMatches<'_>, stdout: &mut dyn Write, ) -> bool
Execute the sequence clap subcommand, if requested to.
Sourcefn do_clap_states(
&mut self,
arg_matches: &ArgMatches<'_>,
stdout: &mut dyn Write,
) -> bool
fn do_clap_states( &mut self, arg_matches: &ArgMatches<'_>, stdout: &mut dyn Write, ) -> bool
Execute the states clap subcommand, if requested to.
Provided Methods§
Sourcefn do_clap(&mut self, arg_matches: &ArgMatches<'_>, stdout: &mut dyn Write)
fn do_clap(&mut self, arg_matches: &ArgMatches<'_>, stdout: &mut dyn Write)
Execute the chosen clap subcommand.
Return whether a command was executed.