pub struct WalFrame {
pub page_number: u32,
pub db_size_after: u32,
pub salt_1: u32,
pub salt_2: u32,
pub checksum_1: u32,
pub checksum_2: u32,
pub data: Vec<u8>,
}Fields§
§page_number: u32§db_size_after: u32§salt_1: u32§salt_2: u32§checksum_1: u32§checksum_2: u32§data: Vec<u8>Implementations§
Source§impl WalFrame
impl WalFrame
pub const HEADER_SIZE: usize = 24
pub fn frame_size(page_size: u32) -> u64
pub fn offset(frame_index: u32, page_size: u32) -> u64
pub fn read<R: Read + Seek>( reader: &mut R, frame_index: u32, page_size: u32, prev_checksum_1: u32, prev_checksum_2: u32, big_endian: bool, validate: bool, ) -> Result<Option<Self>>
pub fn is_commit(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Forget for WalFrame
impl Freeze for WalFrame
impl Move for WalFrame
impl RefUnwindSafe for WalFrame
impl Send for WalFrame
impl Sync for WalFrame
impl Unpin for WalFrame
impl UnsafeUnpin for WalFrame
impl UnwindSafe for WalFrame
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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