pub struct SortedJournalTable<D> { /* private fields */ }Expand description
Caller owns an exclusive immutable device. Open validates the whole file; get checks selected physical pages against its retained identity/hashes. Read failure never writes, retries a mutation or changes ownership.
Implementations§
Source§impl<D: PageDevice> SortedJournalTable<D>
impl<D: PageDevice> SortedJournalTable<D>
pub fn create( device: D, entries: &[SortedJournalEntry], options: SortedTableOptions, ) -> Result<Self, LinkError>
pub fn open(device: D, options: SortedTableOptions) -> Result<Self, LinkError>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn stored_bytes(&self) -> usize
pub fn identity(&self) -> [u8; 16]
pub fn digest(&self) -> u64
pub fn supports_durable_flush(&self) -> bool
pub fn into_device(self) -> D
pub fn get( &mut self, key: &str, ) -> Result<Option<SortedJournalEntry>, LinkError>
pub fn entries(&mut self) -> Result<Vec<SortedJournalEntry>, LinkError>
Auto Trait Implementations§
impl<D> Freeze for SortedJournalTable<D>where
D: Freeze,
impl<D> RefUnwindSafe for SortedJournalTable<D>where
D: RefUnwindSafe,
impl<D> Send for SortedJournalTable<D>where
D: Send,
impl<D> Sync for SortedJournalTable<D>where
D: Sync,
impl<D> Unpin for SortedJournalTable<D>where
D: Unpin,
impl<D> UnsafeUnpin for SortedJournalTable<D>where
D: UnsafeUnpin,
impl<D> UnwindSafe for SortedJournalTable<D>where
D: 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