Skip to main content

EsePage

Struct EsePage 

Source
pub struct EsePage {
    pub page_number: u32,
    pub data: Vec<u8>,
}
Expand description

A single ESE database page.

Fields§

§page_number: u32

Page number (1-based).

§data: Vec<u8>

Raw page data. Parse flags via EsePage::parse_header.

Implementations§

Source§

impl EsePage

Source

pub const HEADER_SIZE: usize = 40

Minimum size of the Vista+ page header.

Source

pub fn parse_header(&self) -> Result<EsePageHeader, EseError>

Parse the Vista+ 40-byte page header from self.data.

Layout (all little-endian):

  • 0x00 (4): XOR checksum
  • 0x04 (4): ECC checksum (Vista+ addition)
  • 0x08 (8): database time (JET_DBTIME)
  • 0x10 (4): previous page number
  • 0x14 (4): next page number
  • 0x18 (4): FDP object ID
  • 0x1C (2): available data size
  • 0x1E (2): available uncommitted data
  • 0x20 (2): available data offset
  • 0x22 (2): available page tag count
  • 0x24 (4): page flags
§Errors

Returns EseError::Corrupt if self.data is shorter than 40 bytes.

Source

pub fn tags(&self) -> Result<Vec<(u16, u16)>, EseError>

Return the tag entries from the end of the page.

Tags are stored at the END of the page, growing downward. Each tag is 4 bytes: bits 0-14 = value offset, bit 15 = flag, bits 16-30 = value size, bit 31 = flag.

Returns Vec<(offset, size)> for each tag.

§Errors

Returns EseError::TagArrayOverflow if the page is too short to hold the declared tag count.

Source

pub fn raw_data_area(&self) -> Result<&[u8], EseError>

Return the raw data area of the page: bytes from the end of the 40-byte page header to the start of the tag array at the page end.

This span contains ALL record bytes laid out sequentially, including bytes that may fall before the smallest tag offset (common in ESE’s cumulative key-prefix-compression format). Scanning this area directly (rather than individual tags) is the correct way to read real ESE catalog pages.

§Errors

Returns EseError::Corrupt if the header cannot be parsed.

Source

pub fn record_data(&self, index: usize) -> Result<&[u8], EseError>

Return the raw record data slice for tag at index.

Tag 0 is the page header tag. Data records start at tag 1.

§Errors

Returns EseError::Corrupt if index is beyond the tag count, or EseError::RecordTooShort if the tag’s data range is out of bounds.

Trait Implementations§

Source§

impl Clone for EsePage

Source§

fn clone(&self) -> EsePage

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 Debug for EsePage

Source§

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

Formats the value using the given formatter. 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> 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.