pub struct DurableLog { /* private fields */ }Expand description
Append-only transaction log with synchronous commit durability.
Implementations§
Source§impl DurableLog
impl DurableLog
Sourcepub fn append_transaction(
&mut self,
transaction_id: Uuid,
operations: &[Vec<u8>],
) -> Result<AppendOutcome, LogError>
pub fn append_transaction( &mut self, transaction_id: Uuid, operations: &[Vec<u8>], ) -> Result<AppendOutcome, LogError>
Appends and synchronizes one atomic transaction.
Retrying the same identifier and operation bytes returns the original receipt without appending. Reusing it with different bytes fails.
§Errors
Returns an error for invalid bounds, conflicting idempotency keys, or filesystem failures. Any append/sync failure poisons the writer so the caller must reopen and recover before another write.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DurableLog
impl RefUnwindSafe for DurableLog
impl Send for DurableLog
impl Sync for DurableLog
impl Unpin for DurableLog
impl UnsafeUnpin for DurableLog
impl UnwindSafe for DurableLog
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