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§
Sourcefn default_port(&self) -> u16
fn default_port(&self) -> u16
Get the default port.
Sourcefn 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 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.
Sourcefn 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,
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.