Trait FromLocal
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ยง
fn 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", so this trait is not object safe.