pub trait FromType<T> {
// Required method
fn from_type() -> Self;
// Provided method
fn insert_dependencies(_type_registration: &mut TypeRegistration) { ... }
}Expand description
Trait used to generate TypeData for trait reflection.
This is used by the #[derive(Reflect)] macro to generate an implementation
of TypeData to pass to TypeRegistration::insert.
Required Methods§
Provided Methods§
Sourcefn insert_dependencies(_type_registration: &mut TypeRegistration)
fn insert_dependencies(_type_registration: &mut TypeRegistration)
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.