pub struct PendingAppend { /* private fields */ }Expand description
An append whose tail is written and fsynced but whose envelope is not:
the file on disk is still the OLD file. PendingAppend::commit
publishes it; dropping it abandons the tail (unreferenced bytes).
Implementations§
Source§impl PendingAppend
impl PendingAppend
pub fn report(&self) -> &AppendReport
Sourcepub fn commit(self) -> Result<AppendReport, CmfError>
pub fn commit(self) -> Result<AppendReport, CmfError>
Rewrite the envelope in place and fsync, then re-open the result with full validation. Should the re-open fail (a bug — the content was validated before the tail was written), the old envelope is restored and the error returned: the file is the old file again.
Auto Trait Implementations§
impl Freeze for PendingAppend
impl RefUnwindSafe for PendingAppend
impl Send for PendingAppend
impl Sync for PendingAppend
impl Unpin for PendingAppend
impl UnsafeUnpin for PendingAppend
impl UnwindSafe for PendingAppend
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