Crate rigetti_pyo3
source ·Expand description
Re-exports
pub use num_complex;pub use pyo3;Modules
Macros
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).Implement
AsMut<T> for a Python wrapper around T.Implement Python comparison for a given type. That type must implement
PartialOrd.Implement a method
parse for wrapper types that implement FromStr.Implement
PyTryFrom for a given Rust type.Generate
PyTryFrom implementations for PyAny that require the PyAny to contain a specific Python type.Implement
PyTryFrom<PyAny> for a given Rust type by delegating to its implementation
for the given Python type.Implement
ToPython once for the given Rust type. Will implement for a reference to the type
if a lifetime is provided.Implement
ToPython<PyAny> for the given Rust type by delegating to its implementation for
the given Python type. Arguments are the same as for
private_impl_to_python_for.Implement
ToPython on the given Rust type and a reference to it.Provides a body for
py_try_from, delegating to the related py_try_from_ref implementation.Provides a body for
py_try_from, delegating to the implementation for the given Python type.Creates a new exception type and implements converting from the given Rust error to the new
exception.
Wrap an enum containing only unit variants.
Create a newtype wrapper for a Rust struct.
Create a Python wrapper around a Rust type.
Create a newtype wrapper for a Rust enum with unique 1-tuple variants.
Wraps an external error type in a newtype
struct so it can be used with py_wrap_error.Traits
Convert from a Python type to a Rust type.
Implemented by wrapper types generated with
py_wrap_* macros:Implemented by wrapper types containing the source type, generated with
py_wrap_* macros:Convert from a Rust type into a Python type.
Implemented by error types generated with
py_wrap_error.