Trait typeinfo::TypeInfo [] [src]

pub trait TypeInfo: Copy {
    fn type_info() -> Type;
}

Trait implemented by copyable POD data types with fixed size, enables runtime reflection.

This trait is implemented by default for all built-in scalar types (integer, floating-point, boolean and character), and there's a generic implementation for fixed-size arrays. Note that pointer-sized integer types isize / usize map to either Int32 / UInt32 or Int64 / UInt64 respectively, depending on the host platform.

The easiest way to generate an implementation for a compound type is to use the provided def! macro.

Required Methods

Returns the runtime type information for the implementing type.

Implementors