pub enum SuggestionType<T> {
Literal(T),
Command {
command: Vec<T>,
prefix: T,
},
}
Expand description
One of two kind of suggestion type
Variants§
Literal(T)
A literal suggestion (ex: -b
after git checkout)
Command
A command to execute while removing the provided prefix (ex: if the user typed git checkout mybr
, execute git branch --no-color --list 'mybr*'
with prefix mybr
)
Trait Implementations§
Source§impl<T: Clone> Clone for SuggestionType<T>
impl<T: Clone> Clone for SuggestionType<T>
Source§fn clone(&self) -> SuggestionType<T>
fn clone(&self) -> SuggestionType<T>
Returns a copy 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<T: Debug> Debug for SuggestionType<T>
impl<T: Debug> Debug for SuggestionType<T>
Source§impl<T: Hash> Hash for SuggestionType<T>
impl<T: Hash> Hash for SuggestionType<T>
Source§impl<T: PartialEq> PartialEq for SuggestionType<T>
impl<T: PartialEq> PartialEq for SuggestionType<T>
Source§impl<T> Serialize for SuggestionType<T>where
T: Serialize,
impl<T> Serialize for SuggestionType<T>where
T: Serialize,
impl<T: Eq> Eq for SuggestionType<T>
impl<T> StructuralPartialEq for SuggestionType<T>
Auto Trait Implementations§
impl<T> Freeze for SuggestionType<T>where
T: Freeze,
impl<T> RefUnwindSafe for SuggestionType<T>where
T: RefUnwindSafe,
impl<T> Send for SuggestionType<T>where
T: Send,
impl<T> Sync for SuggestionType<T>where
T: Sync,
impl<T> Unpin for SuggestionType<T>where
T: Unpin,
impl<T> UnwindSafe for SuggestionType<T>where
T: UnwindSafe,
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