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
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
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
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 !=
.
Auto Trait Implementations
impl RefUnwindSafe for TimeseriesOptions
impl Send for TimeseriesOptions
impl Sync for TimeseriesOptions
impl Unpin for TimeseriesOptions
impl UnwindSafe for TimeseriesOptions
Blanket Implementations
Mutably borrows from an owned value. Read more