pub struct Suggestion {
pub value: String,
pub description: Option<String>,
pub style: Option<Style>,
pub extra: Option<Vec<String>>,
pub span: Span,
pub append_whitespace: bool,
pub match_indices: Option<Vec<usize>>,
}Expand description
Suggestion returned by the Completer
Fields§
§value: StringString replacement that will be introduced to the the buffer
description: Option<String>Optional description for the replacement
style: Option<Style>Optional style for the replacement
extra: Option<Vec<String>>Optional vector of strings in the suggestion. These can be used to represent examples coming from a suggestion
span: SpanReplacement span in the buffer
append_whitespace: boolWhether to append a space after selecting this suggestion. This helps to avoid that a completer repeats the complete suggestion.
match_indices: Option<Vec<usize>>Indices of the graphemes in the suggestion that matched the typed text. Useful if using fuzzy matching.
Trait Implementations§
Source§impl Clone for Suggestion
impl Clone for Suggestion
Source§fn clone(&self) -> Suggestion
fn clone(&self) -> Suggestion
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 Debug for Suggestion
impl Debug for Suggestion
Source§impl Default for Suggestion
impl Default for Suggestion
Source§fn default() -> Suggestion
fn default() -> Suggestion
Returns the “default value” for a type. Read more
Source§impl PartialEq for Suggestion
impl PartialEq for Suggestion
impl Eq for Suggestion
impl StructuralPartialEq for Suggestion
Auto Trait Implementations§
impl Freeze for Suggestion
impl RefUnwindSafe for Suggestion
impl Send for Suggestion
impl Sync for Suggestion
impl Unpin for Suggestion
impl UnwindSafe for Suggestion
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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 more