Trait TypeMetadata

Source
pub trait TypeMetadata {
    // Required method
    fn metadata(registry: &mut TypeRegistry) -> FieldType;
}
Expand description

Exposes metadata about a type that can be used to generate other versions of that type in other languages.

This is usually intended to be derived rather than manually implemented.

Required Methods§

Source

fn metadata(registry: &mut TypeRegistry) -> FieldType

Populates TypeRegistry with this type and any of it’s contained types and returns a FieldType

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.

Implementations on Foreign Types§

Source§

impl TypeMetadata for bool

Source§

impl TypeMetadata for f32

Source§

impl TypeMetadata for f64

Source§

impl TypeMetadata for i8

Source§

impl TypeMetadata for i16

Source§

impl TypeMetadata for i32

Source§

impl TypeMetadata for i64

Source§

impl TypeMetadata for i128

Source§

impl TypeMetadata for str

Source§

impl TypeMetadata for u8

Source§

impl TypeMetadata for u16

Source§

impl TypeMetadata for u32

Source§

impl TypeMetadata for u64

Source§

impl TypeMetadata for u128

Source§

impl TypeMetadata for String

Source§

impl<K, V> TypeMetadata for HashMap<K, V>

Source§

impl<T> TypeMetadata for Option<T>
where T: TypeMetadata,

Source§

impl<T> TypeMetadata for Vec<T>
where T: TypeMetadata,

Implementors§