pub struct Suggestion<T> { /* private fields */ }
Expand description
A single autocompletion suggestion
Implementations§
Source§impl<T> Suggestion<T>
impl<T> Suggestion<T>
Sourcepub const fn new(suggestion: SuggestionType<T>, description: T) -> Self
pub const fn new(suggestion: SuggestionType<T>, description: T) -> Self
Generate a new suggestion to encode
Sourcepub const fn description(&self) -> &T
pub const fn description(&self) -> &T
Get the associated description
Sourcepub const fn suggestion(&self) -> &SuggestionType<T>
pub const fn suggestion(&self) -> &SuggestionType<T>
Get the associated suggestion
Trait Implementations§
Source§impl<T: Clone> Clone for Suggestion<T>
impl<T: Clone> Clone for Suggestion<T>
Source§fn clone(&self) -> Suggestion<T>
fn clone(&self) -> Suggestion<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 Suggestion<T>
impl<T: Debug> Debug for Suggestion<T>
Source§impl<T: Hash> Hash for Suggestion<T>
impl<T: Hash> Hash for Suggestion<T>
Source§impl<T: PartialEq> PartialEq for Suggestion<T>
impl<T: PartialEq> PartialEq for Suggestion<T>
Source§impl<T> Serialize for Suggestion<T>where
T: Serialize,
impl<T> Serialize for Suggestion<T>where
T: Serialize,
impl<T: Eq> Eq for Suggestion<T>
impl<T> StructuralPartialEq for Suggestion<T>
Auto Trait Implementations§
impl<T> Freeze for Suggestion<T>where
T: Freeze,
impl<T> RefUnwindSafe for Suggestion<T>where
T: RefUnwindSafe,
impl<T> Send for Suggestion<T>where
T: Send,
impl<T> Sync for Suggestion<T>where
T: Sync,
impl<T> Unpin for Suggestion<T>where
T: Unpin,
impl<T> UnwindSafe for Suggestion<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