Struct qoqo_calculator_pyo3::CalculatorComplexWrapper[][src]

pub struct CalculatorComplexWrapper {
    pub cc_internal: CalculatorComplex,
}

Fields

cc_internal: CalculatorComplex

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Specify this class has #[pyclass(dict)] or not.

Specify this class has #[pyclass(weakref)] or not.

The closest native ancestor. This is PyAny by default, and when you declare #[pyclass(extends=PyDict)], it’s PyDict. Read more

Allocate the actual field for #[pyclass]. Read more

Deallocate #[pyclass] on the Python heap. Read more

Implement the + (add) magic method to add two CalculatorComplexes.

Arguments

  • lhs - the first CalculatorComplexWrapper object in the operation
  • rhs - the second CalculatorComplexWrapper object in the operation

Returns

PyResult<CalculatorComplexWrapper> - lhs + rhs

Implement the += (iadd) magic method to add a CalculatorComplex to another CalculatorComplex.

Arguments

  • self - the CalculatorComplexWrapper object
  • other - the CalculatorComplexWrapper object to be added to self

Implement the - (sub) magic method to subtract two CalculatorComplexes.

Arguments

  • lhs - the first CalculatorComplexWrapper object in the operation
  • rhs - the second CalculatorComplexWrapper object in the operation

Returns

PyResult<CalculatorComplexWrapper> - lhs - rhs

Implement the -= (isub) magic method to subtract a CalculatorComplex from another CalculatorComplex.

Arguments

  • self - the CalculatorComplexWrapper object
  • other - the CalculatorComplexWrapper object to be subtracted from self

Implement the * (mul) magic method to multiply two CalculatorComplexes.

Arguments

  • lhs - the first CalculatorComplexWrapper object in the operation
  • rhs - the second CalculatorComplexWrapper object in the operation

Returns

PyResult<CalculatorComplexWrapper> - lhs * rhs

Implement the *= (imul) magic method to multiply a CalculatorComplex by another CalculatorComplex.

Arguments

  • self - the CalculatorComplexWrapper object
  • other - the CalculatorComplexWrapper object to multiply self by

Implement the / (truediv) magic method to divide two CalculatorComplexes.

Arguments

  • lhs - the first CalculatorComplexWrapper object in the operation
  • rhs - the second CalculatorComplexWrapper object in the operation

Returns

PyResult<CalculatorComplexWrapper> - lhs / rhs

Implement the /= (itruediv) magic method to divide a CalculatorComplex by another CalculatorComplex.

Arguments

  • self - the CalculatorComplexWrapper object
  • other - the CalculatorComplexWrapper object to divide self by

Implement Python minus sign for CalculatorComplex.

Return Python absolute value abs(x) for CalculatorComplex.

Implement Python Inverse 1/x for CalculatorComplex.

Implement the x.float() (float(x)) Python magic method to convert a CalculatorComplex into a float.

Returns

  • PyResult<f64>

Converts the Rust Panic when CalculatorComplex contains symbolic string value into a Python error

Implement the x.complex() (complex(x)) Python magic method to convert a CalculatorComplex into a complex.

Returns

  • PyResult<Complex<f64>>

Converts the Rust Panic when CalculatorComplex contains symbolic string value into a Python error

Return the repr magic method to represent objects in Python of CalculatorComplex.

Return the format magic method to represent objects in Python of CalculatorComplex.

Return the richcmp magic method to perform rich comparison. operations on CalculatorComplex.

Arguments

  • &self - the CalculatorComplexWrapper object
  • other - the object to compare self to
  • op - equal or not equal

Returns

PyResult<bool> - whether the two operations compared evaluated to True or False

Type of objects to store in PyObject struct

Base class

Layout

Layout of Basetype.

Initializer for layout

Utility type to make Py::as_ref work

Class name

Module name, if any

Class doc string

Type flags (ie PY_TYPE_FLAG_GC, PY_TYPE_FLAG_WEAKREF)

PyTypeObject instance for this type.

Checks if object is an instance of this type or a subclass of this type.

Checks if object is an instance of this type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Extracts Self from the source PyObject.

Performs the conversion.

Arguments for exception

Returns the safe abstraction over the type object.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.