pub struct JournalWalker<'a, R: Read + Seek> { /* private fields */ }Expand description
Walks the live transactions of a journal (start -> end, wrapping at
size). Each next decodes one transaction. The walker reads straight
from the disk so it works on any Read + Seek source.
Implementations§
Source§impl<'a, R: Read + Seek> JournalWalker<'a, R>
impl<'a, R: Read + Seek> JournalWalker<'a, R>
pub fn new( reader: &'a mut R, partition_offset: u64, jib: &JournalInfoBlock, jh: &JournalHeader, ) -> Self
Sourcepub fn next(&mut self) -> Option<Result<TransactionView, JournalError>>
pub fn next(&mut self) -> Option<Result<TransactionView, JournalError>>
Decode the next transaction, or None at end / after a stop. On a
corrupt block-list-header checksum, yields Some(Err(..)) once and then
stops.
Auto Trait Implementations§
impl<'a, R> !UnwindSafe for JournalWalker<'a, R>
impl<'a, R> Freeze for JournalWalker<'a, R>
impl<'a, R> RefUnwindSafe for JournalWalker<'a, R>where
&'a mut R: RefUnwindSafe,
impl<'a, R> Send for JournalWalker<'a, R>
impl<'a, R> Sync for JournalWalker<'a, R>
impl<'a, R> Unpin for JournalWalker<'a, R>
impl<'a, R> UnsafeUnpin for JournalWalker<'a, R>where
&'a mut R: UnsafeUnpin,
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