Skip to content

Commit 6ef3076

Browse files
committed
some missing exports
1 parent cf53e4c commit 6ef3076

File tree

1 file changed

+43
-7
lines changed

1 file changed

+43
-7
lines changed

src/lib.rs

Lines changed: 43 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
use idl::{
2-
Idl, IdlAccount, IdlConst, IdlDefinedFieldsNamed, IdlDefinedFieldsTuple, IdlEnumVariant, IdlErrorCode,
3-
IdlEvent, IdlField, IdlInstruction, IdlInstructionAccount, IdlInstructionAccounts, IdlPda,
4-
IdlSeedAccount, IdlSeedArg, IdlSeedConst, IdlTypeArray, IdlTypeDef, IdlTypeDefAlias,
5-
IdlTypeDefEnum, IdlTypeDefStruct, IdlTypeDefined, IdlTypeGeneric,
6-
IdlTypeOption, IdlTypeSimple, IdlTypeVec,
2+
Idl, IdlAccount, IdlConst, IdlDefinedFieldsNamed, IdlDefinedFieldsTuple, IdlDependency,
3+
IdlDeployments, IdlEnumVariant, IdlErrorCode, IdlEvent, IdlField, IdlInstruction,
4+
IdlInstructionAccount, IdlInstructionAccounts, IdlMetadata, IdlPda, IdlReprModifierC,
5+
IdlReprModifierRust, IdlReprSimple, IdlSeedAccount, IdlSeedArg, IdlSeedConst,
6+
IdlSerializationSimple, IdlTypeArray, IdlTypeDef, IdlTypeDefAlias, IdlTypeDefEnum,
7+
IdlTypeDefGenericConst, IdlTypeDefGenericType, IdlTypeDefStruct, IdlTypeDefined,
8+
IdlTypeGeneric, IdlTypeOption, IdlTypeSimple, IdlTypeVec,
79
};
810
use pyo3::{
911
prelude::*,
@@ -28,19 +30,27 @@ fn anchorpy_idl(py: Python, m: &PyModule) -> PyResult<()> {
2830
m.add_class::<IdlEnumVariant>()?;
2931
m.add_class::<IdlTypeDefEnum>()?;
3032
m.add_class::<IdlTypeDefAlias>()?;
33+
m.add_class::<IdlTypeDefGenericConst>()?;
34+
m.add_class::<IdlTypeDefGenericType>()?;
3135
m.add_class::<IdlTypeDef>()?;
3236
m.add_class::<IdlInstructionAccounts>()?;
3337
m.add_class::<IdlSeedConst>()?;
3438
m.add_class::<IdlSeedArg>()?;
39+
m.add_class::<IdlReprModifierRust>()?;
40+
m.add_class::<IdlReprModifierC>()?;
41+
m.add_class::<IdlReprSimple>()?;
3542
m.add_class::<IdlSeedAccount>()?;
43+
m.add_class::<IdlSerializationSimple>()?;
3644
m.add_class::<IdlPda>()?;
3745
m.add_class::<IdlInstructionAccount>()?;
3846
m.add_class::<IdlInstruction>()?;
3947
m.add_class::<IdlEvent>()?;
4048
m.add_class::<IdlErrorCode>()?;
4149
m.add_class::<IdlTypeGeneric>()?;
50+
m.add_class::<IdlDependency>()?;
51+
m.add_class::<IdlDeployments>()?;
52+
m.add_class::<IdlMetadata>()?;
4253
m.add_class::<IdlAccount>()?;
43-
m.add_class::<IdlTypeDef>()?;
4454
m.add_class::<Idl>()?;
4555

4656
let typing = py.import("typing")?;
@@ -71,12 +81,38 @@ fn anchorpy_idl(py: Python, m: &PyModule) -> PyResult<()> {
7181
"IdlSeed",
7282
union.get_item(PyTuple::new(py, idl_seed_members))?,
7383
)?;
84+
85+
let idl_repr_members = vec![
86+
IdlReprModifierRust::type_object(py),
87+
IdlReprModifierC::type_object(py),
88+
IdlReprSimple::type_object(py),
89+
];
90+
m.add(
91+
"IdlRepr",
92+
union.get_item(PyTuple::new(py, idl_repr_members))?,
93+
)?;
94+
let idl_serialization_members = vec![
95+
IdlSerializationSimple::type_object(py),
96+
PyString::type_object(py),
97+
];
98+
m.add(
99+
"IdlSerialization",
100+
union.get_item(PyTuple::new(py, idl_serialization_members))?,
101+
)?;
102+
let idl_type_def_generic_members = vec![
103+
IdlTypeDefGenericType::type_object(py),
104+
IdlTypeDefGenericConst::type_object(py),
105+
];
106+
m.add(
107+
"IdlTypeDefGeneric",
108+
union.get_item(PyTuple::new(py, idl_type_def_generic_members))?,
109+
)?;
74110
let compound_members = vec![
75111
IdlTypeDefined::type_object(py),
76112
IdlTypeOption::type_object(py),
77113
IdlTypeVec::type_object(py),
78114
IdlTypeArray::type_object(py),
79-
PyString::type_object(py)
115+
PyString::type_object(py),
80116
];
81117
m.add(
82118
"IdlTypeCompound",

0 commit comments

Comments
 (0)