pub struct PreparedInlineCompletionContext {
pub prefix: String,
pub current_line: String,
pub previous_non_empty_line: Option<String>,
pub current_function: Option<String>,
pub current_package: Option<String>,
pub variables: Vec<String>,
pub imports: Vec<String>,
}Expand description
Prepared context for inline completion suggestions and future AI handoff.
Fields§
§prefix: StringPrefix on the current line up to the request position.
current_line: StringFull current line with trailing newline removed.
previous_non_empty_line: Option<String>Closest previous non-empty line, if any.
current_function: Option<String>Nearest enclosing subroutine name, if one can be inferred.
current_package: Option<String>Nearest package declaration before the cursor, if any.
variables: Vec<String>Nearby variables, ordered from closest to farthest.
imports: Vec<String>Imported modules or pragmas visible before the cursor.
Trait Implementations§
Source§impl Clone for PreparedInlineCompletionContext
impl Clone for PreparedInlineCompletionContext
Source§fn clone(&self) -> PreparedInlineCompletionContext
fn clone(&self) -> PreparedInlineCompletionContext
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<'de> Deserialize<'de> for PreparedInlineCompletionContext
impl<'de> Deserialize<'de> for PreparedInlineCompletionContext
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PreparedInlineCompletionContext
impl PartialEq for PreparedInlineCompletionContext
Source§fn eq(&self, other: &PreparedInlineCompletionContext) -> bool
fn eq(&self, other: &PreparedInlineCompletionContext) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for PreparedInlineCompletionContext
impl StructuralPartialEq for PreparedInlineCompletionContext
Auto Trait Implementations§
impl Freeze for PreparedInlineCompletionContext
impl RefUnwindSafe for PreparedInlineCompletionContext
impl Send for PreparedInlineCompletionContext
impl Sync for PreparedInlineCompletionContext
impl Unpin for PreparedInlineCompletionContext
impl UnsafeUnpin for PreparedInlineCompletionContext
impl UnwindSafe for PreparedInlineCompletionContext
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