38 lines
462 B
Rust
38 lines
462 B
Rust
use pyo3::prelude::*;
|
|
|
|
#[pyclass(subclass)]
|
|
enum NotBaseClass {
|
|
X,
|
|
Y,
|
|
}
|
|
|
|
#[pyclass(extends = PyList)]
|
|
enum NotDrivedClass {
|
|
X,
|
|
Y,
|
|
}
|
|
|
|
#[pyclass]
|
|
enum NoEmptyEnum {}
|
|
|
|
#[pyclass]
|
|
enum NoUnitVariants {
|
|
StructVariant { field: i32 },
|
|
UnitVariant,
|
|
}
|
|
|
|
#[pyclass]
|
|
enum NoTupleVariants {
|
|
StructVariant { field: i32 },
|
|
TupleVariant(i32),
|
|
}
|
|
|
|
#[pyclass]
|
|
enum SimpleNoSignature {
|
|
#[pyo3(constructor = (a, b))]
|
|
A,
|
|
B,
|
|
}
|
|
|
|
fn main() {}
|