Skip to main content

EitherTimedelta

No overview available.

Attributes

AttributeTypeDescription
RawDurationStores a standard Rust Duration representing a fixed time interval for internal calculations.
PyExactBound< 'py, PyDelta >Stores a reference to an exact Python datetime.timedelta object to ensure native compatibility without subclass overrides.
PySubclassBound< 'py, PyDelta >Stores a reference to a Python timedelta subclass instance, allowing for specialized behavior or metadata preservation.

Constructor

Signature

def Raw(
duration: Duration
) - > [EitherTimedelta](eithertimedelta.md?sid=input_datetime_eithertimedelta)

Parameters

NameTypeDescription
durationDurationThe Rust Duration value to be wrapped.

Signature

def PyExact(
delta: Bound< 'py, PyDelta >
) - > [EitherTimedelta](eithertimedelta.md?sid=input_datetime_eithertimedelta)

Parameters

NameTypeDescription
deltaBound< 'py, PyDelta >The Python timedelta instance to wrap.

Signature

def PySubclass(
delta: Bound< 'py, PyDelta >
) - > [EitherTimedelta](eithertimedelta.md?sid=input_datetime_eithertimedelta)

Parameters

NameTypeDescription
deltaBound< 'py, PyDelta >The Python timedelta subclass instance to wrap.