pub struct LogFile { /* private fields */ }Expand description
Redo log file reader.
Implementations§
Source§impl LogFile
impl LogFile
Sourcepub fn block_count(&self) -> u64
pub fn block_count(&self) -> u64
Total number of 512-byte blocks in the file.
Sourcepub fn data_block_count(&self) -> u64
pub fn data_block_count(&self) -> u64
Number of data blocks (excluding the 4 header/checkpoint blocks).
Sourcepub fn read_block(&mut self, block_no: u64) -> Result<Vec<u8>, IdbError>
pub fn read_block(&mut self, block_no: u64) -> Result<Vec<u8>, IdbError>
Read a single 512-byte block by block number.
Sourcepub fn read_header(&mut self) -> Result<LogFileHeader, IdbError>
pub fn read_header(&mut self) -> Result<LogFileHeader, IdbError>
Read and parse the log file header (block 0).
Sourcepub fn read_checkpoint(&mut self, slot: u8) -> Result<LogCheckpoint, IdbError>
pub fn read_checkpoint(&mut self, slot: u8) -> Result<LogCheckpoint, IdbError>
Read and parse a checkpoint (slot 0 = block 1, slot 1 = block 3).
Auto Trait Implementations§
impl Freeze for LogFile
impl RefUnwindSafe for LogFile
impl Send for LogFile
impl Sync for LogFile
impl Unpin for LogFile
impl UnwindSafe for LogFile
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