Skip to main content

StateStorageNew

Trait StateStorageNew 

Source
pub trait StateStorageNew: StateStorage {
    // Required method
    fn new<T, State>(value: T) -> Self::Inner<T, State>
       where T: StateMachineImpl,
             <Self::Machine<T> as StateMachineImpl>::Standin: Initial<State>;
}
Expand description

Storage backend that can create initial owned state.

This is the capability behind State::new. The Initial bound prevents raw runtime data from being introduced in a non-initial state.

Required Methods§

Source

fn new<T, State>(value: T) -> Self::Inner<T, State>
where T: StateMachineImpl, <Self::Machine<T> as StateMachineImpl>::Standin: Initial<State>,

Creates a backend-specific inner value in an allowed initial state.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§