pyenum-derive 0.0.2

#[derive(PyEnum)] procedural macro for the `pyenum` crate.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use pyenum::PyEnum;

// `A` auto-resolves to 1 (IntEnum start value); `B = 1` collides and would
// be silently aliased to `A` by Python's `enum.IntEnum` functional API,
// breaking Rust-side round-trip identity.
#[derive(Clone, Copy, PyEnum)]
#[pyenum(base = "IntEnum")]
pub enum Bad {
    A,
    B = 1,
}

fn main() {}