Struct reedline::Suggestion
source · pub struct Suggestion {
pub value: String,
pub description: Option<String>,
pub extra: Option<Vec<String>>,
pub span: Span,
pub append_whitespace: bool,
}
Expand description
Suggestion returned by the Completer
Fields§
§value: String
String replacement that will be introduced to the the buffer
description: Option<String>
Optional description 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: Span
Replacement span in the buffer
append_whitespace: bool
Whether to append a space after selecting this suggestion. This helps to avoid that a completer repeats the complete suggestion.
Trait Implementations§
source§impl Clone for Suggestion
impl Clone for Suggestion
source§fn clone(&self) -> Suggestion
fn clone(&self) -> Suggestion
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 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<Suggestion> for Suggestion
impl PartialEq<Suggestion> for Suggestion
source§fn eq(&self, other: &Suggestion) -> bool
fn eq(&self, other: &Suggestion) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for Suggestion
impl StructuralEq for Suggestion
impl StructuralPartialEq for Suggestion
Auto Trait Implementations§
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