#[non_exhaustive]pub struct NesOpenFile {
pub uri: String,
pub language_id: String,
pub visible_range: Option<Range>,
pub last_focused_ms: Option<u64>,
pub meta: Option<Meta>,
}unstable_nes only.Expand description
An open file in the editor.
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.uri: StringThe URI of the file.
language_id: StringThe language identifier.
visible_range: Option<Range>The visible range in the editor, if any.
last_focused_ms: Option<u64>Timestamp in milliseconds since epoch of when the file was last focused.
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 NesOpenFile
impl NesOpenFile
Sourcepub fn new(uri: impl Into<String>, language_id: impl Into<String>) -> Self
pub fn new(uri: impl Into<String>, language_id: impl Into<String>) -> Self
Builds NesOpenFile with the required fields set; optional fields start unset or empty.
Sourcepub fn visible_range(self, visible_range: impl IntoOption<Range>) -> Self
pub fn visible_range(self, visible_range: impl IntoOption<Range>) -> Self
Sets or clears the optional visibleRange field.
Sourcepub fn last_focused_ms(self, last_focused_ms: impl IntoOption<u64>) -> Self
pub fn last_focused_ms(self, last_focused_ms: impl IntoOption<u64>) -> Self
Sets or clears the optional lastFocusedMs 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 NesOpenFile
impl Clone for NesOpenFile
Source§fn clone(&self) -> NesOpenFile
fn clone(&self) -> NesOpenFile
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 NesOpenFile
impl Debug for NesOpenFile
Source§impl<'de> Deserialize<'de> for NesOpenFile
impl<'de> Deserialize<'de> for NesOpenFile
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 NesOpenFile
Source§impl IntoV2 for NesOpenFile
Available on crate feature unstable_protocol_v2 only.
impl IntoV2 for NesOpenFile
unstable_protocol_v2 only.Source§impl JsonSchema for NesOpenFile
impl JsonSchema for NesOpenFile
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 NesOpenFile
impl PartialEq for NesOpenFile
Source§fn eq(&self, other: &NesOpenFile) -> bool
fn eq(&self, other: &NesOpenFile) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for NesOpenFile
impl Serialize for NesOpenFile
impl StructuralPartialEq for NesOpenFile
Auto Trait Implementations§
impl Freeze for NesOpenFile
impl RefUnwindSafe for NesOpenFile
impl Send for NesOpenFile
impl Sync for NesOpenFile
impl Unpin for NesOpenFile
impl UnsafeUnpin for NesOpenFile
impl UnwindSafe for NesOpenFile
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.