pub trait RunCommand<A, S>{
// Required method
fn run<'life0, 'life1, 'async_trait>(
&'life0 self,
cli: &'life1 CliState<A, S>,
) -> Pin<Box<dyn Future<Output = RoadsterResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Implement to enable Roadster to run your custom CLI commands.
Required Methods§
Sourcefn run<'life0, 'life1, 'async_trait>(
&'life0 self,
cli: &'life1 CliState<A, S>,
) -> Pin<Box<dyn Future<Output = RoadsterResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn run<'life0, 'life1, 'async_trait>(
&'life0 self,
cli: &'life1 CliState<A, S>,
) -> Pin<Box<dyn Future<Output = RoadsterResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Run the command.
§Returns
Ok(true)- If the implementation handled the command and thus the app should end execution after the command is complete.Ok(false)- If the implementation did not handle the command and thus the app should continue execution after the command is complete.Err(...)- If the implementation experienced an error while handling the command. The app should end execution after the command is complete.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".