Trait Handler
Source pub trait Handler:
Sync
+ Send
+ AnySync {
// Required method
fn handle<'life0, 'life1, 'async_trait>(
self: Arc<Self>,
ctx: &'life0 Arc<dyn Context>,
argv: Vec<String>,
cmd: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided methods
fn verb(&self, _ctx: &Arc<dyn Context>) -> Option<&'static str> { ... }
fn condition(&self, ctx: &Arc<dyn Context>) -> bool { ... }
fn help(&self, _ctx: &Arc<dyn Context>) -> &'static str { ... }
fn dyn_help(&self, _ctx: &Arc<dyn Context>) -> String { ... }
fn complete<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 Arc<dyn Context>,
_cmd: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<String>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn start<'life0, 'async_trait>(
self: Arc<Self>,
_ctx: &'life0 Arc<dyn Context>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn stop<'life0, 'async_trait>(
self: Arc<Self>,
_ctx: &'life0 Arc<dyn Context>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}