pub trait SuggestionProvider: Send + Sync {
// Required method
fn list_suggestions(
&self,
context: &CommandSuggestionContext<'_>,
builder: &mut SuggestionsBuilder<'_>,
);
}Expand description
A provider to add suggestions to a builder. This is useful to override the suggestions of a specific argument in a command to follow this provider.
Functions that have the same function signature as that of
SuggestionProvider::list_suggestions also implement this trait.
Required Methods§
Sourcefn list_suggestions(
&self,
context: &CommandSuggestionContext<'_>,
builder: &mut SuggestionsBuilder<'_>,
)
fn list_suggestions( &self, context: &CommandSuggestionContext<'_>, 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".