pub struct PageHeader {
pub magic: u32,
pub page_id: PageId,
pub page_lsn: LogSequenceNumber,
pub page_type: PageType,
pub flags: u8,
pub free_space: u16,
pub checksum: u32,
}Expand description
Page header
Every page starts with this header for ARIES recovery support.
Layout (32 bytes):
- magic: u32 (4 bytes) - validation magic number
- page_id: u64 (8 bytes) - page identifier
- page_lsn: u64 (8 bytes) - LSN of last modification (for recovery)
- page_type: u8 (1 byte) - page type
- flags: u8 (1 byte) - page flags
- free_space: u16 (2 bytes) - free space in page
- checksum: u32 (4 bytes) - page checksum
- reserved: u32 (4 bytes) - reserved for future use
Fields§
§magic: u32Magic number for validation
page_id: PageIdPage identifier
page_lsn: LogSequenceNumberLSN of last modification
page_type: PageTypePage type
flags: u8Flags
free_space: u16Free space in page
checksum: u32Checksum
Implementations§
Source§impl PageHeader
impl PageHeader
Trait Implementations§
Source§impl Clone for PageHeader
impl Clone for PageHeader
Source§fn clone(&self) -> PageHeader
fn clone(&self) -> PageHeader
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PageHeader
impl Debug for PageHeader
impl Copy for PageHeader
Auto Trait Implementations§
impl Freeze for PageHeader
impl RefUnwindSafe for PageHeader
impl Send for PageHeader
impl Sync for PageHeader
impl Unpin for PageHeader
impl UnsafeUnpin for PageHeader
impl UnwindSafe for PageHeader
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> 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