Skip to main content

NoteHeader

Struct NoteHeader 

Source
pub struct NoteHeader {
Show 18 fields pub size: u32, pub rrv_identifier: u32, pub file_identifier: Timedate, pub note_identifier: Timedate, pub sequence_number: u32, pub sequence_time: Timedate, pub status_flags: u16, pub note_class: u16, pub modification_time: Timedate, pub number_of_note_items: u16, pub number_of_responses: u16, pub non_summary_data_identifier: u32, pub non_summary_data_size: u32, pub access_time: Timedate, pub creation_time: Timedate, pub parent_note_identifier: u32, pub folder_reference_count: u32, pub folder_note_identifier: u32,
}
Expand description

Parsed note header. Self-contained snapshot - the reader does not retain a reference into bucket bytes.

Fields§

§size: u32

Total note size in bytes (header + item descriptors + item data).

§rrv_identifier: u32

RRV identifier the note was reached through. Local to one NSF.

§file_identifier: Timedate

File identifier portion of the UNID (8 bytes).

§note_identifier: Timedate

Note identifier portion of the UNID (8 bytes). Together with file_identifier this forms the 16-byte Universal Note ID (UNID) which is globally unique across replicas.

§sequence_number: u32

Replication-sequence number. Increments on every modification.

§sequence_time: Timedate

Replication-sequence time.

§status_flags: u16

Status flags word.

§note_class: u16

Note class (DOCUMENT / FORM / VIEW / ACL / etc). See class constants.

§modification_time: Timedate

Most recent modification time. Operator-facing “when was this note last touched”.

§number_of_note_items: u16

Number of items (fields) attached to this note. Each item has its own descriptor block immediately after the note header.

§number_of_responses: u16

Number of response notes (replies to this note as a parent in a discussion-style database).

§non_summary_data_identifier: u32

Identifier into the non-summary data area for items too large to fit in summary slots (rich-text bodies, attachments).

§non_summary_data_size: u32

Size in bytes of the non-summary data area associated with this note.

§access_time: Timedate

Most recent access time.

§creation_time: Timedate

File-creation time (first-write timestamp).

§parent_note_identifier: u32

NoteID of the parent (for response notes).

§folder_reference_count: u32

Number of folders that reference this note.

§folder_note_identifier: u32

NoteID of an associated folder (if any).

Implementations§

Source§

impl NoteHeader

Source

pub fn parse(bytes: &[u8]) -> Result<Self, NsfError>

Parse a note header from at least the first 100 bytes of a note record. Errors on signature mismatch or short input.

Source

pub fn is_document(&self) -> bool

True if any DOCUMENT bit is set in the note class. User-visible emails, calendar entries, contacts, and custom-form documents all carry this bit.

Source

pub fn is_design(&self) -> bool

True if the note carries any design-related class bit (FORM, VIEW, ICON, DESIGN, HELP, FILTER, FIELD, REPLFORMULA, PRIVATE).

Source

pub fn unid_hex(&self) -> String

16-byte UNID (Universal Note Identifier) as a hex string. This is the globally-unique identifier that survives replication and compaction. Two replicas of the same logical note carry the same UNID.

Trait Implementations§

Source§

impl Clone for NoteHeader

Source§

fn clone(&self) -> NoteHeader

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for NoteHeader

Source§

impl Debug for NoteHeader

Source§

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

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

impl Eq for NoteHeader

Source§

impl PartialEq for NoteHeader

Source§

fn eq(&self, other: &NoteHeader) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for NoteHeader

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.