pub struct MmapWalReader { /* private fields */ }Expand description
Memory-mapped WAL segment reader.
Opens a sealed WAL segment file via mmap and provides zero-copy iteration over records. The mmap’d region is read-only and the kernel manages page residency — no application-level memory pinning.
Implementations§
Source§impl MmapWalReader
impl MmapWalReader
Sourcepub fn next_record(&mut self) -> Result<Option<WalRecord>>
pub fn next_record(&mut self) -> Result<Option<WalRecord>>
Read the next record from the mmap’d region.
Returns None at EOF or at the first corruption point.
Zero-copy: payload bytes reference the mmap’d region directly.
Sourcepub fn records(self) -> MmapRecordIter ⓘ
pub fn records(self) -> MmapRecordIter ⓘ
Iterator over all valid records in the mmap’d segment.
Auto Trait Implementations§
impl Freeze for MmapWalReader
impl RefUnwindSafe for MmapWalReader
impl Send for MmapWalReader
impl Sync for MmapWalReader
impl Unpin for MmapWalReader
impl UnsafeUnpin for MmapWalReader
impl UnwindSafe for MmapWalReader
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