pub trait Persist<'a>where
Self: Sized,{
type State;
type ConstructorArgs;
type Error;
// Required methods
fn save(&self) -> Self::State;
fn restore(
constructor_args: Self::ConstructorArgs,
state: &Self::State,
) -> Result<Self, Self::Error>;
}
Expand description
An abstract interface for saving/restoring a component using a specific state.
Required Associated Types§
Sourcetype ConstructorArgs
type ConstructorArgs
The type of the object holding the constructor arguments.
Required Methods§
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.