pub struct CompletionContext {
pub position: usize,
pub trigger_character: Option<char>,
pub in_string: bool,
pub in_regex: bool,
pub in_comment: bool,
pub in_use_statement: bool,
pub current_package: String,
pub prefix: String,
pub prefix_start: usize,
pub cursor_scope_id: usize,
}Expand description
Context for completion
Fields§
§position: usizeThe position where completion was triggered
trigger_character: Option<char>The character that triggered completion (if any)
in_string: boolWhether we’re in a string literal
in_regex: boolWhether we’re in a regex
in_comment: boolWhether we’re in a comment
in_use_statement: boolWhether we’re completing a module name after use or require
current_package: StringCurrent package context
prefix: StringPrefix text before cursor
prefix_start: usizeStart position of the prefix (for text edit range calculation)
cursor_scope_id: usizeThe innermost scope containing the cursor position
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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto 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