Skip to main content

RefCommitter

Trait RefCommitter 

Source
pub trait RefCommitter: Send + Sync {
    // Required method
    fn commit_records(
        &self,
        encoded_records: &[Vec<u8>],
        scope: Option<&str>,
    ) -> Result<()>;
}
Expand description

The write-side dual of RefReconciler (heddle#330 §2.2 “The write chokepoint”): commits the caller’s ref-carrying oplog record batch (phase 4) before the canonical publish (phase 5), so no ref is published without a preceding replayable record. The records cross the seam as opaque rmp-serde-encoded bytes, so refs names no oplog type; the impl (in repo) decodes and appends them. Injected via RefManager::with_committer.

Required Methods§

Source

fn commit_records( &self, encoded_records: &[Vec<u8>], scope: Option<&str>, ) -> Result<()>

Append the (opaque-encoded) ref-carrying OpRecord batch under the oplog write lock — phase 4, the commit point.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§