pub struct HandlerCli { /* private fields */ }
Implementations§
Source§impl HandlerCli
impl HandlerCli
pub fn new() -> Self
pub fn collect(&self) -> Vec<Arc<dyn Handler>>
pub fn get(&self, name: &str) -> Option<Arc<dyn Handler>>
pub fn register<T, H>(&self, ctx: &Arc<T>, handler: H)
pub fn register_arc<T, H>(&self, ctx: &Arc<T>, handler: &Arc<H>)
pub fn unregister(&self, name: &str) -> Option<Arc<dyn Handler>>
pub fn clear(&self) -> Result<()>
pub async fn start<T>(&self, ctx: &Arc<T>) -> Result<()>
pub async fn stop<T>(&self, ctx: &Arc<T>) -> Result<()>
pub async fn execute<T>(&self, ctx: &Arc<T>, cmd: &str) -> Result<()>
pub async fn complete<T>( &self, ctx: &Arc<T>, cmd: &str, ) -> Result<Option<Vec<String>>>
Trait Implementations§
Source§impl Default for HandlerCli
impl Default for HandlerCli
Source§fn default() -> HandlerCli
fn default() -> HandlerCli
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for HandlerCli
impl RefUnwindSafe for HandlerCli
impl Send for HandlerCli
impl Sync for HandlerCli
impl Unpin for HandlerCli
impl UnwindSafe for HandlerCli
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more