Trait ockam_command::Command
source · pub trait Command: Clone + Sized + Send + Sync + 'static {
const NAME: &'static str;
// Required method
fn async_run<'life0, 'async_trait>(
self,
ctx: &'life0 Context,
opts: CommandGlobalOpts,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn name(&self) -> String { ... }
fn retry_opts(&self) -> Option<RetryOpts> { ... }
fn run(self, opts: CommandGlobalOpts) -> Result<()> { ... }
fn async_run_with_retry<'life0, 'async_trait>(
self,
ctx: &'life0 Context,
opts: CommandGlobalOpts,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}Required Associated Constants§
Required Methods§
fn async_run<'life0, 'async_trait>(
self,
ctx: &'life0 Context,
opts: CommandGlobalOpts,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Provided Methods§
fn name(&self) -> String
fn retry_opts(&self) -> Option<RetryOpts>
fn run(self, opts: CommandGlobalOpts) -> Result<()>
fn async_run_with_retry<'life0, 'async_trait>(
self,
ctx: &'life0 Context,
opts: CommandGlobalOpts,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Object Safety§
This trait is not object safe.