Struct Suggestion
#[non_exhaustive]pub struct Suggestion {
pub range: (usize, usize),
pub text: String,
pub tooltip: Option<String>,
pub int_value: Option<i32>,
}Expand description
A command completion replacing a byte range of the input.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.range: (usize, usize)Start (inclusive) and end (exclusive) byte offsets.
text: StringReplacement text.
tooltip: Option<String>Optional explanation of the completion.
int_value: Option<i32>Numeric sort value for integer completions.
Implementations§
§impl Suggestion
impl Suggestion
Trait Implementations§
§impl Clone for Suggestion
impl Clone for Suggestion
§fn clone(&self) -> Suggestion
fn clone(&self) -> Suggestion
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for Suggestion
impl Debug for Suggestion
impl Eq for Suggestion
§impl PartialEq for Suggestion
impl PartialEq 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 UnsafeUnpin 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