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

Class doc string

#[pyclass(gc)]

#[pyclass(subclass)]

#[pyclass(extends=…)]

Layout

Base class

This handles following two situations: 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.

👎 Deprecated since 0.14.0:

prefer implementing __complex__ in #[pymethods] instead of in a protocol

👎 Deprecated since 0.14.0:

prefer implementing __round__ in #[pymethods] instead of in a protocol

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

👎 Deprecated since 0.14.0:

prefer implementing __format__ in #[pymethods] instead of in a protocol

👎 Deprecated since 0.14.0:

prefer implementing __bytes__ in #[pymethods] instead of in a protocol

Utility type to make Py::as_ref work.

Class name.

Module name, if any.

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)

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.