Skip to main content

CommitAction

Trait CommitAction 

Source
pub trait CommitAction {
    // Required method
    fn after_commit(&mut self);
}
Expand description

A short action invoked after commit, while competing commits remain excluded.

The action runs synchronously on the admitting thread. It must not acquire resources, wait for payload work, or mutate the same admission domain. Reads are permitted. Its domain-specific result belongs to the caller; returning from this method is not an acknowledgement of any external effect.

A native effect must be resolved locally under this boundary. Queueing an asynchronous request and returning does not extend the exclusion to that request. Failure or caller loss after commit requires reconciliation, not unconditional repetition of the action.

Required Methods§

Source

fn after_commit(&mut self)

Acts once after this invocation’s new commit, before releasing exclusion.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<F> CommitAction for F
where F: FnMut(),