EitherTime
This class represents a time value that can be either a native Rust Time object or a Python PyTime object. It provides a unified interface for handling time data across the Rust-Python boundary, allowing for flexible processing of time-related information regardless of its origin.
Attributes
| Attribute | Type | Description |
|---|---|---|
| Raw | Time | Stores a native Time object used for direct temporal calculations without Python overhead. |
| Py | Bound< 'py, PyTime > | Stores a reference to a Python datetime.time object for interoperability with Python-side logic. |
Constructor
Signature
def EitherTime()
Signature
def Raw(
time: Time
) - > [EitherTime](eithertime.md?sid=input_datetime_eithertime)
Parameters
| Name | Type | Description |
|---|---|---|
| time | Time | The internal Time structure to be wrapped. |
Signature
def Py(
py_time: Bound< 'py, PyTime >
) - > [EitherTime](eithertime.md?sid=input_datetime_eithertime)
Parameters
| Name | Type | Description |
|---|---|---|
| py_time | Bound< 'py, PyTime > | The Python-managed time object to be wrapped. |