pub trait Value {
type Storage: Copy;
// Required methods
fn into_storage(self) -> Self::Storage;
fn from_storage(storage: Self::Storage) -> Self;
}Expand description
A value that can be written into or read from type-errased storage.
Required Associated Types§
Required Methods§
Sourcefn into_storage(self) -> Self::Storage
fn into_storage(self) -> Self::Storage
Converts a variable value into the variable storage type.
Sourcefn from_storage(storage: Self::Storage) -> Self
fn from_storage(storage: Self::Storage) -> Self
Reads a variable value out of storage.
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.