pub trait RbBack: Rb {
type Checkpoint: Clone;
// Required methods
fn checkpoint<'a>(this: Self::Target<'a>) -> Self::Checkpoint;
fn rollback<'a>(this: Self::Target<'a>, checkpoint: Self::Checkpoint);
}Expand description
Reborrow-friendly variant of Back.
Required Associated Types§
Sourcetype Checkpoint: Clone
type Checkpoint: Clone
A clonable checkpoint that can restore the input to an earlier state.
Required Methods§
Sourcefn checkpoint<'a>(this: Self::Target<'a>) -> Self::Checkpoint
fn checkpoint<'a>(this: Self::Target<'a>) -> Self::Checkpoint
Create a rollback checkpoint.
Sourcefn rollback<'a>(this: Self::Target<'a>, checkpoint: Self::Checkpoint)
fn rollback<'a>(this: Self::Target<'a>, checkpoint: Self::Checkpoint)
Roll back the input to a previously created checkpoint.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.