Skip to main content

SuggestionProvider

Trait SuggestionProvider 

Source
pub(crate) trait SuggestionProvider<S, A: CommandArgumentParser<S>>: Send + Sync {
    // Required method
    fn list_suggestions(
        &self,
        context: &ArgumentSuggestionContext<'_, S, A::Value>,
        builder: &mut SuggestionsBuilder<'_>,
    );
}
Expand description

A provider to add suggestions to a builder.

Functions that have the same function signature as that of SuggestionProvider::list_suggestions also implement this trait.

Required Methods§

Source

fn list_suggestions( &self, context: &ArgumentSuggestionContext<'_, S, A::Value>, builder: &mut SuggestionsBuilder<'_>, )

Adds suggestions, according to this provider, to the given builder.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§