Struct qoqo_calculator_pyo3::CalculatorFloatWrapper[][src]

pub struct CalculatorFloatWrapper {
    pub cf_internal: CalculatorFloat,
}

Fields

cf_internal: CalculatorFloat

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 CalculatorFloats.

Arguments

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

Returns

PyResult<CalculatorFloatWrapper> - lhs + rhs

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

Arguments

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

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

Arguments

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

Returns

PyResult<CalculatorFloatWrapper> - lhs - rhs

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

Arguments

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

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

Arguments

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

Returns

PyResult<CalculatorFloatWrapper> - lhs * rhs

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

Arguments

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

Return pow (power) for CalculatorFloat and generic type Py<PyAny>.

Arguments

  • other - Any Python object that can be converted to CalculatorFloat

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

Arguments

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

Returns

PyResult<CalculatorFloatWrapper> - lhs / rhs

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

Arguments

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

Implement Python minus sign for CalculatorFloat.

Return Python absolute value abs(x) for CalculatorFloat.

Implement Python Inverse 1/x for CalculatorFloat.

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

Returns

  • PyResult<f64>

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

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

Returns

  • PyResult<Complex<f64>>

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

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

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

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

Arguments

  • &self - the CalculatorFloatWrapper 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.