#[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>,
}unstable_nes only.Expand description
Context attached to a suggestion request.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
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
Sourcepub fn new() -> Self
pub fn new() -> Self
Builds NesSuggestContext with the required fields set; optional fields start unset or empty.
Sourcepub fn recent_files(
self,
recent_files: impl IntoOption<Vec<NesRecentFile>>,
) -> Self
pub fn recent_files( self, recent_files: impl IntoOption<Vec<NesRecentFile>>, ) -> Self
Sets or clears the optional recentFiles field.
Sets or clears the optional relatedSnippets field.
Sourcepub fn edit_history(
self,
edit_history: impl IntoOption<Vec<NesEditHistoryEntry>>,
) -> Self
pub fn edit_history( self, edit_history: impl IntoOption<Vec<NesEditHistoryEntry>>, ) -> Self
Sets or clears the optional editHistory field.
Sourcepub fn user_actions(
self,
user_actions: impl IntoOption<Vec<NesUserAction>>,
) -> Self
pub fn user_actions( self, user_actions: impl IntoOption<Vec<NesUserAction>>, ) -> Self
Sets or clears the optional userActions field.
Sourcepub fn open_files(self, open_files: impl IntoOption<Vec<NesOpenFile>>) -> Self
pub fn open_files(self, open_files: impl IntoOption<Vec<NesOpenFile>>) -> Self
Sets or clears the optional openFiles field.
Sourcepub fn diagnostics(
self,
diagnostics: impl IntoOption<Vec<NesDiagnostic>>,
) -> Self
pub fn diagnostics( self, diagnostics: impl IntoOption<Vec<NesDiagnostic>>, ) -> Self
Sets or clears the optional diagnostics field.
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
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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
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>,
impl Eq for NesSuggestContext
Source§impl IntoV2 for NesSuggestContext
Available on crate feature unstable_protocol_v2 only.
impl IntoV2 for NesSuggestContext
unstable_protocol_v2 only.Source§impl JsonSchema for NesSuggestContext
impl JsonSchema for NesSuggestContext
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$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
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.