#[non_exhaustive]pub struct NesSuggestContext {
pub recent_files: Option<Vec<NesRecentFile>>,
pub related_snippets: Option<Vec<NesRelatedSnippet>>,
pub edit_history: Option<Vec<NesEditHistoryEntry>>,
pub user_actions: Option<Vec<NesUserAction>>,
pub open_files: Option<Vec<NesOpenFile>>,
pub diagnostics: Option<Vec<NesDiagnostic>>,
pub meta: Option<Meta>,
}Available on crate features
unstable_nes and unstable_protocol_v2 only.Expand description
Context attached to a suggestion request.
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.recent_files: Option<Vec<NesRecentFile>>Recently accessed files.
Related code snippets.
edit_history: Option<Vec<NesEditHistoryEntry>>Recent edit history.
user_actions: Option<Vec<NesUserAction>>Recent user actions (typing, navigation, etc.).
open_files: Option<Vec<NesOpenFile>>Currently open files in the editor.
diagnostics: Option<Vec<NesDiagnostic>>Current diagnostics (errors, warnings).
meta: Option<Meta>The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
Implementations§
Source§impl NesSuggestContext
impl NesSuggestContext
pub fn new() -> Self
pub fn recent_files( self, recent_files: impl IntoOption<Vec<NesRecentFile>>, ) -> Self
pub fn edit_history( self, edit_history: impl IntoOption<Vec<NesEditHistoryEntry>>, ) -> Self
pub fn user_actions( self, user_actions: impl IntoOption<Vec<NesUserAction>>, ) -> Self
pub fn open_files(self, open_files: impl IntoOption<Vec<NesOpenFile>>) -> Self
pub fn diagnostics( self, diagnostics: impl IntoOption<Vec<NesDiagnostic>>, ) -> Self
Sourcepub fn meta(self, meta: impl IntoOption<Meta>) -> Self
pub fn meta(self, meta: impl IntoOption<Meta>) -> Self
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
Trait Implementations§
Source§impl Clone for NesSuggestContext
impl Clone for NesSuggestContext
Source§fn clone(&self) -> NesSuggestContext
fn clone(&self) -> NesSuggestContext
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 NesSuggestContext
impl Debug for NesSuggestContext
Source§impl Default for NesSuggestContext
impl Default for NesSuggestContext
Source§fn default() -> NesSuggestContext
fn default() -> NesSuggestContext
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for NesSuggestContext
impl<'de> Deserialize<'de> for NesSuggestContext
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
impl Eq for NesSuggestContext
Source§impl IntoV1 for NesSuggestContext
impl IntoV1 for NesSuggestContext
Source§impl JsonSchema for NesSuggestContext
impl JsonSchema for NesSuggestContext
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for NesSuggestContext
impl PartialEq for NesSuggestContext
Source§fn eq(&self, other: &NesSuggestContext) -> bool
fn eq(&self, other: &NesSuggestContext) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for NesSuggestContext
impl Serialize for NesSuggestContext
impl StructuralPartialEq for NesSuggestContext
Auto Trait Implementations§
impl Freeze for NesSuggestContext
impl RefUnwindSafe for NesSuggestContext
impl Send for NesSuggestContext
impl Sync for NesSuggestContext
impl Unpin for NesSuggestContext
impl UnsafeUnpin for NesSuggestContext
impl UnwindSafe for NesSuggestContext
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