pyo3/tests/ui/invalid_pyclass_enum.rs

31 lines
375 B
Rust
Raw Normal View History

use pyo3::prelude::*;
#[pyclass(subclass)]
enum NotBaseClass {
X,
Y,
}
#[pyclass(extends = PyList)]
enum NotDrivedClass {
X,
Y,
}
2021-11-22 16:58:33 +00:00
#[pyclass]
enum NoEmptyEnum {}
2024-01-15 15:57:42 +00:00
#[pyclass]
enum NoUnitVariants {
StructVariant { field: i32 },
UnitVariant,
}
#[pyclass]
enum NoTupleVariants {
StructVariant { field: i32 },
TupleVariant(i32),
}
fn main() {}