pub trait Snapshot<S> {
    // Required methods
    fn capture(self) -> Result<S, ()>;
    fn restore(&mut self, snapshot: S) -> Result<(), Box<dyn Error>>;
}
Expand description

AZble to capture and restore its state.

Required Methods§

source

fn capture(self) -> Result<S, ()>

Capture the current state.

source

fn restore(&mut self, snapshot: S) -> Result<(), Box<dyn Error>>

Restore a state.

Implementors§