pub trait Stateful {
type State: Clone;
// Required methods
fn state(&self) -> Self::State;
fn set_state(&mut self, state: Self::State) -> Result<()>;
fn restore_state(&mut self, state: Self::State) -> Result<()>;
}Expand description
Stateful trait for objects with state
Required Associated Types§
Required Methods§
Sourcefn restore_state(&mut self, state: Self::State) -> Result<()>
fn restore_state(&mut self, state: Self::State) -> Result<()>
Restore state