pub struct JournalReader<'a, T: Pod + FixedLayout> { /* private fields */ }Expand description
Read-only journal view.
Implementations§
Source§impl<'a, T: Pod + FixedLayout> JournalReader<'a, T>
impl<'a, T: Pod + FixedLayout> JournalReader<'a, T>
Sourcepub fn write_head(&self) -> u32
pub fn write_head(&self) -> u32
Write head.
Sourcepub fn total_written(&self) -> u32
pub fn total_written(&self) -> u32
Total written.
Sourcepub fn entry_count(&self) -> usize
pub fn entry_count(&self) -> usize
Number of valid entries.
Sourcepub fn is_circular(&self) -> bool
pub fn is_circular(&self) -> bool
Is circular.
Sourcepub fn read(&self, index: usize) -> Result<T, ProgramError>
pub fn read(&self, index: usize) -> Result<T, ProgramError>
Read entry at logical index.
Sourcepub fn latest(&self) -> Result<T, ProgramError>
pub fn latest(&self) -> Result<T, ProgramError>
Read the most recent entry.
Auto Trait Implementations§
impl<'a, T> Freeze for JournalReader<'a, T>
impl<'a, T> RefUnwindSafe for JournalReader<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for JournalReader<'a, T>where
T: Send,
impl<'a, T> Sync for JournalReader<'a, T>where
T: Sync,
impl<'a, T> Unpin for JournalReader<'a, T>where
T: Unpin,
impl<'a, T> UnsafeUnpin for JournalReader<'a, T>
impl<'a, T> UnwindSafe for JournalReader<'a, T>where
T: UnwindSafe,
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