Skip to main content

Crate rigetti_pyo3

Crate rigetti_pyo3 

Source
Expand description

Helpful macros and traits for creating a Python bindings to a Rust library.

§Usage

See the examples directory in the source for example usage of a majority of the crate.

Alternatively, check the examples on the macros in this documentation.

Re-exports§

pub use pyo3;

Macros§

create_exception
Create a new Python exception.
create_init_submodule
Create a crate-private function init_submodule to set up this submodule and call the same function on child modules (which should also use this macro).
exception
Create a Python exception and a conversion from its Rust type. Note that the exception class must still be added to the module.
fix_complex_enums
Fix the __qualname__ on a list of complex enums so that they can be pickled.
impl_repr
Implement __repr__ for a type that implement Debug.

Functions§

fix_enum_qual_names
Fix the __qualname__ on PyO3’s “complex enums” so that they can be pickled.