pub trait AsState { // Required method fn as_state(&mut self) -> &mut State; }
For consumers that need to use a type other than State as the Store data, this trait must be implemented for that type.
State
Store
data
Gives access to the inner State.
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".