Struct pyo3_chrono::Duration
source · pub struct Duration(pub Duration);
Expand description
A wrapper around chrono::Duration
that can be converted to and from Python’s datetime.timedelta
Tuple Fields§
§0: Duration
Trait Implementations§
source§impl FromPyObject<'_> for Duration
impl FromPyObject<'_> for Duration
source§impl Ord for Duration
impl Ord for Duration
source§impl PartialEq<Duration> for Duration
impl PartialEq<Duration> for Duration
source§impl PartialOrd<Duration> for Duration
impl PartialOrd<Duration> for Duration
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl ToPyObject for Duration
impl ToPyObject for Duration
impl Copy for Duration
impl Eq for Duration
impl StructuralEq for Duration
impl StructuralPartialEq for Duration
Auto Trait Implementations§
impl RefUnwindSafe for Duration
impl Send for Duration
impl Sync for Duration
impl Unpin for Duration
impl UnwindSafe for Duration
Blanket Implementations§
source§impl<T> ToBorrowedObject for Twhere
T: ToPyObject,
impl<T> ToBorrowedObject for Twhere
T: ToPyObject,
source§fn with_borrowed_ptr<F, R>(&self, py: Python<'_>, f: F) -> Rwhere
F: FnOnce(*mut PyObject) -> R,
fn with_borrowed_ptr<F, R>(&self, py: Python<'_>, f: F) -> Rwhere
F: FnOnce(*mut PyObject) -> R,
👎Deprecated since 0.17.0: this trait is no longer used by PyO3, use ToPyObject or IntoPy<PyObject>
Converts self into a Python object and calls the specified closure
on the native FFI pointer underlying the Python object. Read more