Trait CustomCompleter

Source
pub trait CustomCompleter: Send + Sync {
    // Required method
    fn complete(
        &self,
        ctx: &RootCtx<'_>,
        subcommand_path: &[&str],
        arg_id: &str,
    ) -> impl Send + Future<Output = Vec<String>>;
}
Expand description

A custom completer for a particular argument.

Required Methods§

Source

fn complete( &self, ctx: &RootCtx<'_>, subcommand_path: &[&str], arg_id: &str, ) -> impl Send + Future<Output = Vec<String>>

Generates a list of completions for the given argument.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl CustomCompleter for ()

Source§

async fn complete( &self, _ctx: &RootCtx<'_>, _subcommand_path: &[&str], _arg_id: &str, ) -> Vec<String>

Implementors§