Skip to main content

StateOption

Trait StateOption 

Source
pub trait StateOption<T> {
    type Saver: StateSaver<T>;

    // Required method
    fn save_state(&self) -> Self::Saver;
}
Expand description

Trait implemented by compile-time state option tags passed to ChainLockTransaction::until_done.

Required Associated Types§

Source

type Saver: StateSaver<T>

The RAII StateSaver type instantiated for this option.

Required Methods§

Source

fn save_state(&self) -> Self::Saver

Saves the environment state for the duration of the transaction and returns the RAII StateSaver.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<T, O: StateOption<T>> StateOption<T> for Option<O>

Source§

type Saver = <O as StateOption<T>>::Saver