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 async fn format_device(&self)
pub async fn recover(&self)
pub fn begin_transaction(&self) -> Transaction
pub async fn commit_transaction(&self, txn: Transaction)
Sourcepub async fn read_with_overlay(&self, offset: u64, len: u64) -> TinyBuf
pub async fn read_with_overlay(&self, offset: u64, len: u64) -> TinyBuf
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.
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.