EitherFloat
This class represents a value that can be either a native 64-bit float or a Python float object. It provides a way to handle floating-point data across the boundary between native code and the Python runtime.
Attributes
| Attribute | Type | Description |
|---|---|---|
| F64 | f64 | Stores a native Rust 64-bit floating-point value for high-performance numerical operations. |
| Py | Bound< 'py, PyFloat > | Stores a reference to a Python float object for interoperability with the Python runtime. |
Constructor
Signature
def F64(
value: f64
) - > [EitherFloat](eitherfloat.md?sid=input_return_enums_eitherfloat)
Parameters
| Name | Type | Description |
|---|---|---|
| value | f64 | The 64-bit floating-point primitive to be wrapped. |
Signature
def Py(
value: Bound< 'py, PyFloat >
) - > [EitherFloat](eitherfloat.md?sid=input_return_enums_eitherfloat)
Parameters
| Name | Type | Description |
|---|---|---|
| value | Bound< 'py, PyFloat > | The bound reference to the Python float object being wrapped. |