Struct mongodb::options::TimeseriesOptions[][src]

#[non_exhaustive]
pub struct TimeseriesOptions { pub time_field: String, pub meta_field: Option<String>, pub granularity: Option<TimeseriesGranularity>, }
Expand description

Specifies options for creating a timeseries collection.

Fields (Non-exhaustive)

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
time_field: String

Name of the top-level field to be used for time. Inserted documents must have this field, and the field must be of the BSON UTC datetime type.

meta_field: Option<String>

Name of the top-level field describing the series. This field is used to group related data and may be of any BSON type, except for array. This name may not be the same as the timeField or _id.

granularity: Option<TimeseriesGranularity>

The units you’d use to describe the expected interval between subsequent measurements for a time-series. Defaults to TimeseriesGranularity::Seconds if unset.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. 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.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.