Skip to main content

CommandFactory

Trait CommandFactory 

Source
pub trait CommandFactory: Send + Sync {
    // Required methods
    fn protocol(&self) -> &str;
    fn create_run_command(&self, args: &RunCommandArgs) -> Box<dyn Command>;
    fn create_list_command(&self) -> Box<dyn Command>;
    fn create_validate_command(&self, path: PathBuf) -> Box<dyn Command>;
}
Expand description

Command factory for dynamic command creation.

Required Methods§

Source

fn protocol(&self) -> &str

Get the protocol this factory supports.

Source

fn create_run_command(&self, args: &RunCommandArgs) -> Box<dyn Command>

Create a run command for this protocol.

Source

fn create_list_command(&self) -> Box<dyn Command>

Create a list command for this protocol.

Source

fn create_validate_command(&self, path: PathBuf) -> Box<dyn Command>

Create a validate command for this protocol.

Implementors§