Skip to main content

Landing

Trait Landing 

Source
pub trait Landing: Send {
    // Required methods
    fn name(&self) -> &'static str;
    fn record(
        &mut self,
        handle: &SequencerHandle,
        change: &Change,
        commit: ContentHash,
    ) -> Result<(), String>;
}
Expand description

How the queue records that a change landed.

Required Methods§

Source

fn name(&self) -> &'static str

The implementation’s name, for reports and journals.

Source

fn record( &mut self, handle: &SequencerHandle, change: &Change, commit: ContentHash, ) -> Result<(), String>

Records that change landed, with the merged state named by commit.

Called once per landing, in landing order, so an implementation that needs the previous value for a compare-and-swap can keep it between calls.

§Errors

The sequencer refused the op: an unsigned op under a policy that demands a signature, a failed CAS because something else moved the target first, or a quota. Every one of them voids the rest of the round rather than the one change, because the changes behind it were merged onto a state the log did not accept.

Implementors§