TypeOrigin
type TypeOrigin
Stores the origin of a data type where it first appeared in the version chain. A data type is identified by the name of the module and the name of the struct/enum in combination.
BCS
The BCS serialized form of this type is specified in [`bcs-schema.abnf`](https://github.com/iotaledger/iota-rust-sdk/blob/develop/crates/iota-sdk-types/bcs-schema.abnf\).
type TypeOrigin struct {
// The name of the module the data type resides in.
ModuleName *Identifier
// The name of the data type. Either refers to an enum or a struct identifier.
DatatypeName *Identifier
// ID of the package, where the given type first appeared.
Package *ObjectId
}
func TypeOriginFromBcs
func TypeOriginFromBcs(bcs []byte) (TypeOrigin, error)
Create this type from BCS encoded bytes.
func TypeOriginFromJson
func TypeOriginFromJson(json string) (TypeOrigin, error)
Create this type from a JSON encoded string.
func (*TypeOrigin) Destroy
func (r *TypeOrigin) Destroy()
func (TypeOrigin) ToBcs
func (_self TypeOrigin) ToBcs() ([]byte, error)
Convert this type to BCS encoded bytes.
func (TypeOrigin) ToDisplayString
func (_self TypeOrigin) ToDisplayString() string
Render this type as human-readable text.
The layout is meant for reading and can change between releases. Use the JSON or BCS conversions for output that gets parsed.
func (TypeOrigin) ToJson
func (_self TypeOrigin) ToJson() (string, error)
Convert this type to a JSON encoded string.