FromType

Trait FromType 

Source
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§

Source

fn from_type() -> Self

Return the data for the type.

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.

Implementors§

Source§

impl<T> FromType<T> for SchemaDeserialize
where T: HasSchema + for<'de> Deserialize<'de>,