Module type_info.move
This module exposes functions that can be used to obtain metadata about a type.
Function: type_of
This function can be used to introspect a given type. It returns a TypeInfo
object that can be read using trivial helper functions:
struct TypeInfo has copy, drop, store {
account_address: address,
module_name: vector,
struct_name: vector,
}
Inputs
Type
T
Validation: None required.
Impact: The type to introspect.
Function: type_name
This function can be used to obtain a string that represents the fully qualified name of a type (e.g., 0x1::coin::Coin
).
Inputs
Type
T
Validation: None required.
Impact: The type to introspect.