Struct chrono_elapsed::Elapsed [−][src]
pub struct Elapsed { /* fields omitted */ }
Expand description
Provides a context-aware DateTime
object; a given DateTime
is made aware in the context of the
current DateTime
(or in the context of a given DateTime
, see new_with_context
.)
Allows you to easily obtain information such as datetime is due in 42 minutes and 30 seconds
,
datetime is overdue by 3 days and 2 hours
, or when given context, time between x and y is 42 years and 9 months
.
Aliased as DueDateTime
out of the box in case that makes more sense in your context.
Implementations
Construct a new object from a Date
rather than DateTime
.
Construct a new object and then add Local
timezone.
Construct a new object from a Date
then add Local
timezone.
Construct a new object with a custom context
, rather than the default now
.
Construct a new object from a Date
with a custom context
.
Set the Elapsed
’s datetime_context. Will clear cached diff
values.
Set the Elapsed
’s datetime. Will clear cached diff
values.
Set the Elapsed
’s date. Will clear cached diff
values.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Elapsed
impl UnwindSafe for Elapsed
Blanket Implementations
Mutably borrows from an owned value. Read more