pub struct WalHeader {
pub magic: u32,
pub format_version: u32,
pub page_size: u32,
pub checkpoint_seq: u32,
pub salts: WalSalts,
pub checksum: SqliteWalChecksum,
}Expand description
Parsed 32-byte WAL header.
Layout:
Offset Size Description
0 4 Magic: 0x377F0682 (LE checksum) or 0x377F0683 (BE checksum)
4 4 Format version: 3007000
8 4 Page size in bytes
12 4 Checkpoint sequence number
16 4 Salt-1
20 4 Salt-2
24 4 Checksum-1 (of bytes 0..24)
28 4 Checksum-2 (of bytes 0..24)Fields§
§magic: u32Magic number: WAL_MAGIC_LE or WAL_MAGIC_BE.
format_version: u32Format version (must be WAL_FORMAT_VERSION).
page_size: u32Database page size in bytes.
checkpoint_seq: u32Checkpoint sequence number.
salts: WalSaltsSalt pair for frame validation.
checksum: SqliteWalChecksumHeader checksum (covers bytes 0..24).
Implementations§
Source§impl WalHeader
impl WalHeader
Sourcepub const fn big_endian_checksum(&self) -> bool
pub const fn big_endian_checksum(&self) -> bool
Whether the magic indicates big-endian checksum words.
Sourcepub fn from_bytes(buf: &[u8]) -> Result<Self>
pub fn from_bytes(buf: &[u8]) -> Result<Self>
Parse a 32-byte WAL header from raw bytes.
Trait Implementations§
impl Copy for WalHeader
impl Eq for WalHeader
impl StructuralPartialEq for WalHeader
Auto Trait Implementations§
impl Freeze for WalHeader
impl RefUnwindSafe for WalHeader
impl Send for WalHeader
impl Sync for WalHeader
impl Unpin for WalHeader
impl UnsafeUnpin for WalHeader
impl UnwindSafe for WalHeader
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).