#[repr(C)]pub struct WalHeader {
pub magic: u32,
pub file_format: u32,
pub page_size: u32,
pub checkpoint_seq: u32,
pub salt_1: u32,
pub salt_2: u32,
pub checksum_1: u32,
pub checksum_2: u32,
}Expand description
The Write-Ahead Log (WAL) header. The first 32 bytes of a WAL file comprise the WAL header. The WAL header is divided into the following fields stored in big-endian order.
Fields§
§magic: u32Magic number. 0x377f0682 or 0x377f0683 If the LSB is 0, checksums are native byte order, else checksums are serialized
file_format: u32WAL format version. Currently 3007000
page_size: u32Database page size in bytes. Power of two between 512 and 65536 inclusive
checkpoint_seq: u32Checkpoint sequence number. Increases with each checkpoint
salt_1: u32Random value used for the first salt in checksum calculations TODO: Incremented with each checkpoint
salt_2: u32Random value used for the second salt in checksum calculations. TODO: A different random value for each checkpoint
checksum_1: u32First checksum value in the wal-header
checksum_2: u32Second checksum value in the wal-header
Implementations§
Trait Implementations§
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<K, Q> Comparable<Q> for K
impl<K, Q> Comparable<Q> for K
Source§impl<K, Q> Equivalent<Q> for K
impl<K, Q> Equivalent<Q> for K
Source§fn equivalent(&self, key: &Q) -> bool
fn equivalent(&self, key: &Q) -> bool
Compare self to
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more