Skip to main content

CommandFactoryExtra

Trait CommandFactoryExtra 

Source
pub trait CommandFactoryExtra: CommandFactory {
    // Provided methods
    fn get_completion<Completion, Name>(name: Name, shell: Shell) -> Completion
       where Completion: Write + Default,
             Name: Into<String> { ... }
    fn get_completion_string(
        name: impl Into<String>,
        shell: Shell,
    ) -> Result<String, Utf8Error> { ... }
    fn generate_completion(generator: CompletionGenerator) -> Result<(), Error> { ... }
    fn run_completion_generator() -> ExitCode { ... }
}
Expand description

Additional methods for CommandFactory.

Provided Methods§

Source

fn get_completion<Completion, Name>(name: Name, shell: Shell) -> Completion
where Completion: Write + Default, Name: Into<String>,

Get completion content.

Source

fn get_completion_string( name: impl Into<String>, shell: Shell, ) -> Result<String, Utf8Error>

Get completion string.

Source

fn generate_completion(generator: CompletionGenerator) -> Result<(), Error>

Generate a shell completion file.

Source

fn run_completion_generator() -> ExitCode

Create and run the completion generator.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§