Enum rinfluxdb_types::InstantOrDuration[][src]

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>)

Tuple Fields

An instant in time

Duration(Duration)

Tuple Fields

The instant corresponding to the current time plus a duration

Trait Implementations

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

Converts the given value to a String. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more