pub trait FromLocal<T> {
// Required method
fn from_local(value: T) -> Self;
}Expand description
Converts some value into a locally-stored type, using LocalStorage.
This is modeled on From but special-cased for this thread-local storage method, which
allows for better type inference for the default case.
Required Methods§
Sourcefn from_local(value: T) -> Self
fn from_local(value: T) -> Self
Converts between the types.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".