Trait ink_metadata::TypeInfo
pub trait TypeInfo {
type Identity: 'static + ?Sized;
// Required method
fn type_info() -> Type;
}
Expand description
Implementors return their meta type information.
Required Associated Types§
type Identity: 'static + ?Sized
type Identity: 'static + ?Sized
The type identifying for which type info is provided.
§Note
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§
fn type_info() -> Type
fn type_info() -> Type
Returns the static type identifier for Self
.
Object Safety§
This trait is not object safe.