MoveStruct
Description of a struct type, defined in a Move module.
type MoveStruct implements IMoveDatatype {
abilities: [MoveAbility!]
fields: [MoveField!]
module: MoveModule!
name: String!
typeParameters: [MoveDatatypeTypeParameter!]
}
Fields
MoveStruct.abilities
● [MoveAbility!]
list enum
Abilities on this struct definition.
MoveStruct.fields
● [MoveField!]
list object
The names and types of the struct's fields.
Field types reference type parameters by their index in the defining struct's typeParameters
list.
MoveStruct.module
● MoveModule!
non-null object
The module that this struct is defined in.
MoveStruct.name
● String!
non-null scalar
The struct's unqualified name.
MoveStruct.typeParameters
● [MoveDatatypeTypeParameter!]
list object
Constraints on the struct's formal type parameters.
Move bytecode does not name type parameters, so when they are referenced (e.g. in field types), they are identified by their index in this list.
Interfaces
IMoveDatatype
interface
Interface implemented by all GraphQL types that represent a Move datatype definition (either a struct or an enum definition).
This interface is used to provide a way to access fields that are shared by both structs and enums, e.g., the module that the datatype belongs to, the name of the datatype, type parameters etc.
Member Of
MoveDatatype
object ● MoveModule
object ● MoveStructConnection
object ● MoveStructEdge
object