Struct mungos::options::TimeseriesOptions
source · [−]#[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.
Implementations
Trait Implementations
sourceimpl Clone for TimeseriesOptions
impl Clone for TimeseriesOptions
sourcefn clone(&self) -> TimeseriesOptions
fn clone(&self) -> TimeseriesOptions
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for TimeseriesOptions
impl Debug for TimeseriesOptions
sourceimpl<'de> Deserialize<'de> for TimeseriesOptions
impl<'de> Deserialize<'de> for TimeseriesOptions
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<TimeseriesOptions, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<TimeseriesOptions, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<TimeseriesOptions> for TimeseriesOptions
impl PartialEq<TimeseriesOptions> for TimeseriesOptions
sourcefn eq(&self, other: &TimeseriesOptions) -> bool
fn eq(&self, other: &TimeseriesOptions) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &TimeseriesOptions) -> bool
fn ne(&self, other: &TimeseriesOptions) -> bool
This method tests for !=
.
sourceimpl Serialize for TimeseriesOptions
impl Serialize for TimeseriesOptions
sourcefn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for TimeseriesOptions
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more