pub struct WriteJournal { /* private fields */ }
Implementations§
Source§impl WriteJournal
impl WriteJournal
pub fn new( device: SeekableAsyncFile, offset: u64, capacity: u64, commit_delay: Duration, ) -> Self
pub fn generate_blank_state(&self) -> Vec<u8> ⓘ
pub fn begin_transaction(&self) -> Transaction
pub async fn commit_transaction(&self, txn: Transaction)
Sourcepub async fn clear_from_overlay(&self, offset: u64)
pub async fn clear_from_overlay(&self, offset: u64)
WARNING: Use this function with caution, it’s up to the caller to avoid the potential issues with misuse, including logic incorrectness, cache incoherency, and memory leaking. Carefully read notes/Overlay.md before using the overlay. WARNING: It’s unlikely you want to to use this function, as it will cause cache coherency problems as this only removes the overlay entry, so stale device data will be read instead. You most likely want to write blank/default data instead. However, this is available if you know what you’re doing and have a need.
Auto Trait Implementations§
impl !Freeze for WriteJournal
impl !RefUnwindSafe for WriteJournal
impl Send for WriteJournal
impl Sync for WriteJournal
impl Unpin for WriteJournal
impl !UnwindSafe for WriteJournal
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