Crate anchor_idl

Crate anchor_idl 

Source
Expand description

Generates Rust code from an Anchor IDL.

Structs§

FieldListProperties
Generator
GeneratorOptions
Idl
IdlAccount
IdlConst
IdlDependency
IdlDeployments
IdlEnumVariant
IdlErrorCode
IdlEvent
IdlField
IdlInstruction
IdlInstructionAccount
IdlInstructionAccounts
IdlMetadata
IdlPda
IdlReprModifier
IdlSeedAccount
IdlSeedArg
IdlSeedConst
IdlTypeDef
StructOpts

Enums§

IdlArrayLen
IdlDefinedFields
IdlGenericArg
IdlInstructionAccountItem
IdlRepr
IdlSeed
IdlSerialization
IdlType
IdlTypeDefGeneric
IdlTypeDefTy

Constants§

GEN_VERSION
Version of anchor-idl.
IDL_SPEC
IDL specification Semantic Version

Functions§

generate_account
Generates an account state struct.
generate_account_fields
Generates a list of [IdlAccountItem]s as a TokenStream.
generate_accounts
Generates account state structs.
generate_enum
Generates an enum.
generate_enum_fields
Generates enum fields from a list of IdlFields.
generate_enum_tuple_types
Generates enum tuple types from a list of IdlTypes.
generate_event
Generates a struct.
generate_events
Generates event structs.
generate_ix_handler
Generates a single instruction handler.
generate_ix_handlers
Generates all instruction handlers.
generate_ix_structs
Generates instruction context structs.
generate_struct
Generates a struct.
generate_typedefs
Generates structs and enums.
get_defined_fields_list_properties
get_field_list_properties
get_type_list_properties
get_type_properties
get_variant_list_properties
ty_to_rust_type
Converts an IdlType to a String of the Rust representation.

Type Aliases§

IdlDiscriminator