pub enum InstantOrDuration {
Instant(DateTime<Utc>),
Duration(Duration),
}
Expand description
An entity which is either an instant or a duration
InfluxDB allows to use durations where instants are expected, and
interprets them as the point in time relative to the current instant.
E.g. if now is 2021-03-10T22:43:32Z
, the duration Duration::Minutes(-4)
is interpreted as the instant 2021-03-10T22:39:32Z
.
Variants§
Instant(DateTime<Utc>)
An instant in time
Duration(Duration)
The instant corresponding to the current time plus a duration
Trait Implementations§
Source§impl Debug for InstantOrDuration
impl Debug for InstantOrDuration
Source§impl From<Duration> for InstantOrDuration
impl From<Duration> for InstantOrDuration
Source§impl From<TimeDelta> for InstantOrDuration
impl From<TimeDelta> for InstantOrDuration
Auto Trait Implementations§
impl Freeze for InstantOrDuration
impl RefUnwindSafe for InstantOrDuration
impl Send for InstantOrDuration
impl Sync for InstantOrDuration
impl Unpin for InstantOrDuration
impl UnwindSafe for InstantOrDuration
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more