Trait FromRef
pub trait FromRef<T> {
// Required method
fn from_ref(input: &T) -> Self;
}Expand description
Create Self from a reference T
This is mostly used for extractors, but it can be used for anything that needs to create an owned type from a reference
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.