Skip to main content

EseFile

Struct EseFile 

Source
pub struct EseFile { /* private fields */ }
Expand description

A minimally-parsed ESE database file — reads the header + gives you random-access page reads. Does not walk B-trees or enumerate tables (v0.2 roadmap).

Implementations§

Source§

impl EseFile

Source

pub fn open(path: impl AsRef<Path>) -> Result<Self, Error>

Open + validate an ESE database file. Reads only the 668-byte database header at open-time; page reads happen on demand.

Source

pub fn parse_header(hdr: &[u8]) -> Result<HeaderFields, Error>

Parse the 668-byte header without any I/O. Useful for tests or when the caller has already read the bytes over the wire.

Source

pub fn format_version(&self) -> u32

Source

pub fn format_revision(&self) -> u32

Source

pub fn page_size(&self) -> u32

Source

pub fn file_type(&self) -> u32

Source

pub fn previous_full_backup_log_gen(&self) -> u32

Source

pub fn previous_incremental_backup_log_gen(&self) -> u32

Source

pub fn current_full_backup_log_gen(&self) -> u32

Source

pub fn page(&mut self, page_number: u32) -> Result<RawPage, Error>

Read a page from the database by 1-indexed page number (page 0 is the header, page 1 is the shadow header, real pages start at 2). Returns the parsed RawPage.

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.