#[non_exhaustive]pub struct NesOpenFile {
pub uri: String,
pub language_id: String,
pub visible_range: Option<Range>,
pub last_focused_ms: Option<u64>,
}Available on crate feature
unstable_nes only.Expand description
An open file in the editor.
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.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.
Implementations§
Source§impl NesOpenFile
impl NesOpenFile
pub fn new(uri: impl Into<String>, language_id: impl Into<String>) -> Self
pub fn visible_range(self, visible_range: impl IntoOption<Range>) -> Self
pub fn last_focused_ms(self, last_focused_ms: impl IntoOption<u64>) -> Self
Trait Implementations§
Source§impl Clone for NesOpenFile
impl Clone for NesOpenFile
Source§fn clone(&self) -> NesOpenFile
fn clone(&self) -> NesOpenFile
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 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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for NesOpenFile
Source§impl IntoV2 for NesOpenFile
Available on crate feature unstable_protocol_v2 only.
impl IntoV2 for NesOpenFile
Available on crate feature
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>
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 NesOpenFile
impl PartialEq for NesOpenFile
Source§fn eq(&self, other: &NesOpenFile) -> bool
fn eq(&self, other: &NesOpenFile) -> bool
Tests for
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
Mutably borrows from an owned value. Read more