NotepadTabStat

Struct NotepadTabStat 

Source
pub struct NotepadTabStat {
Show 21 fields pub tabstate_path: Option<String>, pub signature: [u8; 2], pub seq_number: u64, pub is_saved_file: bool, pub path_size: u64, pub path: Option<String>, pub file_size: Option<u64>, pub encoding: Option<Encoding>, pub cr_type: Option<CRType>, pub last_write_time: Option<FileTime>, pub file_hash: Option<String>, pub unknown1: Option<[u8; 2]>, pub cursor_start: Option<u64>, pub cursor_end: Option<u64>, pub config_block: ConfigBlock, pub file_content_size: u64, pub file_content: String, pub contain_unsaved_data: bool, pub checksum: String, pub unsaved_chunks: Option<UnsavedChunks>, pub unsaved_chunks_str: Option<String>,
}
Expand description

Represents the structure for TabState files

Fields§

§tabstate_path: Option<String>§signature: [u8; 2]§seq_number: u64§is_saved_file: bool§path_size: u64§path: Option<String>§file_size: Option<u64>§encoding: Option<Encoding>§cr_type: Option<CRType>§last_write_time: Option<FileTime>§file_hash: Option<String>§unknown1: Option<[u8; 2]>§cursor_start: Option<u64>§cursor_end: Option<u64>§config_block: ConfigBlock§file_content_size: u64§file_content: String§contain_unsaved_data: bool§checksum: String§unsaved_chunks: Option<UnsavedChunks>§unsaved_chunks_str: Option<String>

Implementations§

Source§

impl NotepadTabStat

Source

pub fn from_path(path: &str) -> Result<Self, NotepadErrors>

Read the file from path and use from_reader to parse it

Source

pub fn from_reader<R: Read>(reader: &mut R) -> Result<Self, NotepadErrors>

Parse data from reader

Trait Implementations§

Source§

impl Debug for NotepadTabStat

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for NotepadTabStat

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Serialize for NotepadTabStat

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.