pub trait CheckpointOptionExt<T> {
// Required methods
fn unwrap_or_revert(self, checkpoint: &Checkpoint) -> T;
fn expect_or_revert(self, checkpoint: &Checkpoint, msg: &str) -> T;
}Expand description
Extension trait for Option that provides checkpoint-based revert on None.
Required Methods§
Sourcefn unwrap_or_revert(self, checkpoint: &Checkpoint) -> T
fn unwrap_or_revert(self, checkpoint: &Checkpoint) -> T
Returns the Some value, or reverts to the checkpoint on None.
Sourcefn expect_or_revert(self, checkpoint: &Checkpoint, msg: &str) -> T
fn expect_or_revert(self, checkpoint: &Checkpoint, msg: &str) -> T
Returns the Some value, or logs the message and reverts to the checkpoint on None.