pub struct WalSectionHeader {
pub start_offset: u64,
pub end_offset: u64,
pub is_full: bool,
pub crc32: u32,
}Expand description
WAL section header for circular buffer bookkeeping.
Fields§
§start_offset: u64Read pointer offset (inclusive), as a logical ring offset.
The serialized form stores a validity marker in the MSB, so the logical offset is masked
with WalSectionHeader::OFFSET_MASK when persisted and decoded.
end_offset: u64Write pointer offset (exclusive), as a logical ring offset.
is_full: boolWhether the buffer is full (disambiguates start_offset == end_offset).
This is persisted by storing a flag in the MSB of the serialized end_offset. Therefore,
the ring length must stay within WalSectionHeader::OFFSET_MASK.
crc32: u32CRC32 for bytes [0..16).
Implementations§
Trait Implementations§
Source§impl Clone for WalSectionHeader
impl Clone for WalSectionHeader
Source§fn clone(&self) -> WalSectionHeader
fn clone(&self) -> WalSectionHeader
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 WalSectionHeader
impl Debug for WalSectionHeader
impl Eq for WalSectionHeader
Source§impl PartialEq for WalSectionHeader
impl PartialEq for WalSectionHeader
impl StructuralPartialEq for WalSectionHeader
Auto Trait Implementations§
impl Freeze for WalSectionHeader
impl RefUnwindSafe for WalSectionHeader
impl Send for WalSectionHeader
impl Sync for WalSectionHeader
impl Unpin for WalSectionHeader
impl UnsafeUnpin for WalSectionHeader
impl UnwindSafe for WalSectionHeader
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