SaveState

Trait SaveState 

Source
pub trait SaveState {
    // Required method
    fn save_state<F: Fn() -> String>(&mut self, loc: F) -> Result<()>;
}
Expand description

Provides method that saves self.state to self.history and propagates to any fields with state

Required Methods§

Source

fn save_state<F: Fn() -> String>(&mut self, loc: F) -> Result<()>

Saves self.state to self.history and propagates to any fields with state

§Arguments
  • loc: closure that returns file and line number where called

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.

Implementors§