pub(crate) struct FixedSuggestionProvider {
suggestions: &'static [&'static str],
}Expand description
An implementation of SuggestionProvider that suggests a constant array of suggestions.
Fields§
§suggestions: &'static [&'static str]Implementations§
Trait Implementations§
Source§impl<S, A: CommandArgumentParser<S>> SuggestionProvider<S, A> for FixedSuggestionProvider
impl<S, A: CommandArgumentParser<S>> SuggestionProvider<S, A> for FixedSuggestionProvider
Source§fn list_suggestions(
&self,
_context: &ArgumentSuggestionContext<'_, S, A::Value>,
builder: &mut SuggestionsBuilder<'_>,
)
fn list_suggestions( &self, _context: &ArgumentSuggestionContext<'_, S, A::Value>, builder: &mut SuggestionsBuilder<'_>, )
Adds suggestions, according to this provider, to the given builder.
Auto Trait Implementations§
impl Freeze for FixedSuggestionProvider
impl RefUnwindSafe for FixedSuggestionProvider
impl Send for FixedSuggestionProvider
impl Sync for FixedSuggestionProvider
impl Unpin for FixedSuggestionProvider
impl UnsafeUnpin for FixedSuggestionProvider
impl UnwindSafe for FixedSuggestionProvider
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreWraps this value in an
Arc<SyncMutex<>>