Skip to main content

RuntimeStoreWriteFence

Trait RuntimeStoreWriteFence 

Source
pub trait RuntimeStoreWriteFence: Send + Sync {
    // Required method
    fn execute_if_current(
        &self,
        operation: Box<dyn FnOnce() -> Result<(), RuntimeStoreError> + '_>,
    ) -> Result<RuntimeStoreWriteFenceOutcome, RuntimeStoreError>;
}
Expand description

Synchronous authority guard for a RuntimeStore target write.

Implementations MUST retain their authority serialization guard for the full duration of operation, invoke it exactly once only when authority is current, and never invoke it for Conflict or Backoff. The operation is synchronous by design so built-in stores can call it inside their own lock or transaction immediately before the target write. Time-bounded authority must be evaluated using the authority store’s own clock while that guard is held, never a caller-supplied observation timestamp. Once a successful operation returns, the fence must return Applied without a new fallible boundary. Implementations must not re-enter the same RuntimeStore from this callback.

Required Methods§

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§