Skip to main content

StateSaver

Trait StateSaver 

Source
pub trait StateSaver<T> {
    // Required method
    fn relax(&mut self, transaction: &T);
}
Expand description

Trait implemented by environment-specific state savers (such as IRQ-save and preempt-disable guards) managed by ChainLockTransaction::until_done.

Required Methods§

Source

fn relax(&mut self, transaction: &T)

Relaxes the saved state (e.g., unregistering the transaction, re-enabling interrupts / preemption, waiting for conflict resolution, re-disabling interrupts / preemption, and re-registering the transaction) during a backoff cycle.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§