pub trait TypeInfo {
    type Identity: 'static + ?Sized;

    fn type_info() -> Type<MetaForm>;
Expand description

Implementors return their meta type information.

Required Associated Types

The type identifying for which type info is provided.


This is used to uniquely identify a type via core::any::TypeId::of. In most cases it will just be Self, but can be used to unify different types which have the same encoded representation e.g. reference types Box<T>, &T and &mut T.

Required Methods

Returns the static type identifier for Self.

Implementations on Foreign Types

Manual TypeInfo implementation because of custom encoding. The data is a valid encoded Vec<u8>, but requires some logic to extract the signature and payload.

See UncheckedExtrinsic::encode and UncheckedExtrinsic::decode.