Skip to main content

ProtocolCommand

Trait ProtocolCommand 

Source
pub trait ProtocolCommand: Command {
    // Required methods
    fn protocol(&self) -> Protocol;
    fn default_port(&self) -> u16;
    fn start_server<'life0, 'life1, 'async_trait>(
        &'life0 self,
        ctx: &'life1 mut CliContext,
    ) -> Pin<Box<dyn Future<Output = CliResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn stop_server<'life0, 'life1, 'async_trait>(
        &'life0 self,
        ctx: &'life1 mut CliContext,
    ) -> Pin<Box<dyn Future<Output = CliResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Base trait for protocol-specific commands.

Required Methods§

Source

fn protocol(&self) -> Protocol

Get the protocol type.

Source

fn default_port(&self) -> u16

Get the default port.

Source

fn start_server<'life0, 'life1, 'async_trait>( &'life0 self, ctx: &'life1 mut CliContext, ) -> Pin<Box<dyn Future<Output = CliResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Start the protocol server.

Source

fn stop_server<'life0, 'life1, 'async_trait>( &'life0 self, ctx: &'life1 mut CliContext, ) -> Pin<Box<dyn Future<Output = CliResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Stop the protocol server.

Implementors§