pub enum CompletionResult<const MAX_MATCHES: usize> {
None,
Single {
completion: String<128>,
is_directory: bool,
},
Multiple {
common_prefix: String<128>,
all_matches: Vec<String<64>, MAX_MATCHES>,
},
}Expand description
Tab completion result with type-safe variants for different match outcomes.
Variants§
None
No matches found for the input prefix
Single
Exactly one match found (auto-completable)
Fields
Multiple
Multiple matches found (show options to user)
Implementations§
Trait Implementations§
Source§impl<const MAX_MATCHES: usize> Clone for CompletionResult<MAX_MATCHES>
impl<const MAX_MATCHES: usize> Clone for CompletionResult<MAX_MATCHES>
Source§fn clone(&self) -> CompletionResult<MAX_MATCHES>
fn clone(&self) -> CompletionResult<MAX_MATCHES>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<const MAX_MATCHES: usize> Debug for CompletionResult<MAX_MATCHES>
impl<const MAX_MATCHES: usize> Debug for CompletionResult<MAX_MATCHES>
Source§impl<const MAX_MATCHES: usize> PartialEq for CompletionResult<MAX_MATCHES>
impl<const MAX_MATCHES: usize> PartialEq for CompletionResult<MAX_MATCHES>
Source§fn eq(&self, other: &CompletionResult<MAX_MATCHES>) -> bool
fn eq(&self, other: &CompletionResult<MAX_MATCHES>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<const MAX_MATCHES: usize> StructuralPartialEq for CompletionResult<MAX_MATCHES>
Auto Trait Implementations§
impl<const MAX_MATCHES: usize> Freeze for CompletionResult<MAX_MATCHES>
impl<const MAX_MATCHES: usize> RefUnwindSafe for CompletionResult<MAX_MATCHES>
impl<const MAX_MATCHES: usize> Send for CompletionResult<MAX_MATCHES>
impl<const MAX_MATCHES: usize> Sync for CompletionResult<MAX_MATCHES>
impl<const MAX_MATCHES: usize> Unpin for CompletionResult<MAX_MATCHES>
impl<const MAX_MATCHES: usize> UnsafeUnpin for CompletionResult<MAX_MATCHES>
impl<const MAX_MATCHES: usize> UnwindSafe for CompletionResult<MAX_MATCHES>
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