pub struct CompletionContext {
pub expecting: Vec<ExpectedTokens>,
pub replace_from: usize,
}Expand description
What the grammar accepts at a cursor position, plus the span the UI should
replace when it inserts a completion. Returned by Parser::parse_at_cursor.
Fields§
§expecting: Vec<ExpectedTokens>What the grammar accepts at the cursor.
replace_from: usizeThe span [replace_from, cursor) the UI should replace — e.g. the F
in A1+F. Equals the cursor when there is nothing to replace (right
after SUM().
Trait Implementations§
Source§impl Clone for CompletionContext
impl Clone for CompletionContext
Source§fn clone(&self) -> CompletionContext
fn clone(&self) -> CompletionContext
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 moreSource§impl Debug for CompletionContext
impl Debug for CompletionContext
Source§impl PartialEq for CompletionContext
impl PartialEq for CompletionContext
Source§fn eq(&self, other: &CompletionContext) -> bool
fn eq(&self, other: &CompletionContext) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for CompletionContext
impl Serialize for CompletionContext
impl StructuralPartialEq for CompletionContext
Auto Trait Implementations§
impl Freeze for CompletionContext
impl RefUnwindSafe for CompletionContext
impl Send for CompletionContext
impl Sync for CompletionContext
impl Unpin for CompletionContext
impl UnsafeUnpin for CompletionContext
impl UnwindSafe for CompletionContext
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