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§

source

const NAME: &'static str

Required Methods§

source

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§

source

fn name(&self) -> String

source

fn retry_opts(&self) -> Option<RetryOpts>

source

fn run(self, opts: CommandGlobalOpts) -> Result<()>

source

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.

Implementors§

source§

impl Command for ockam_command::identity::CreateCommand

source§

const NAME: &'static str = "identity create"

source§

impl Command for ockam_command::node::CreateCommand

source§

const NAME: &'static str = "node create"

source§

impl Command for ockam_command::tcp::outlet::create::CreateCommand

source§

const NAME: &'static str = "tcp-outlet create"