Skip to content
Discussion options

You must be logged in to vote

Answering my own question - this seems to work

impl MyEnum {
    #[getter]
    fn value(&self) -> PyResult<usize> {
        Ok(*self as usize)
    }
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@davidhewitt
Comment options

Answer selected by davidhewitt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants