pub trait FromRef<T> {
// Required method
fn from_ref(value: &T) -> Self;
}Expand description
This trait is essentially equivalent to From<&T>, other than it allows us
to implement it for external types that don’t implement it out of the box,
most notably primitive types.
Required Methods§
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.