pub trait FromType<T> {
// Required method
fn from_type() -> Self;
}Expand description
Trait implemented for types that can produce an instance of themselves from a Rust type.
This is useful for type datas, which may be derived for a type if the type data
implements FromType for type that is deriving it.
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.