Skip to main content

MoveEnum

Description of an enum type, defined in a Move module.

type MoveEnum implements IMoveDatatype {
abilities: [MoveAbility!]
module: MoveModule!
name: String!
typeParameters: [MoveDatatypeTypeParameter!]
variants: [MoveEnumVariant!]
}

Fields

MoveEnum.abilities ● [MoveAbility!] list enum

Abilities on this enum definition.

MoveEnum.module ● MoveModule! non-null object

The module that this enum is defined in.

MoveEnum.name ● String! non-null scalar

The enum's unqualified name.

MoveEnum.typeParameters ● [MoveDatatypeTypeParameter!] list object

Constraints on the enum'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.

MoveEnum.variants ● [MoveEnumVariant!] list object

The names and fields of the enum's variants

Field types reference type parameters by their index in the defining enum's typeParameters 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 ● MoveEnumConnection object ● MoveEnumEdge object ● MoveModule object