pub trait PyComplexMethods<'py>: Sealed {
// Required methods
fn real(&self) -> c_double;
fn imag(&self) -> c_double;
fn abs(&self) -> c_double;
fn pow(&self, other: &Bound<'py, PyComplex>) -> Bound<'py, PyComplex>;
}Expand description
Implementation of functionality for PyComplex.
These methods are defined for the Bound<'py, PyComplex> smart pointer, so to use method call
syntax these methods are separated into a trait, because stable Rust does not yet support
arbitrary_self_types.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".