Enum elasticsearch_dsl::search::params::CalendarInterval
source · [−]pub enum CalendarInterval {
Minute,
Hour,
Day,
Week,
Month,
Quarter,
Year,
}
Expand description
Calendar-aware intervals are configured with the calendar_interval
parameter. You can specify
calendar intervals using the unit name, such as month
, or as a single unit quantity, such as
1M
. For example,day
and 1d
are equivalent. Multiple quantities, such as 2d
, are not supported.
Variants
Minute
All minutes begin at 00 seconds. One minute is the interval between 00 seconds of the first minute and 00 seconds of the following minute in the specified time zone, compensating for any intervening leap seconds, so that the number of minutes and seconds past the hour is the same at the start and end.
Hour
All hours begin at 00 minutes and 00 seconds. One hour (1h) is the interval between 00:00 minutes of the first hour and 00:00 minutes of the following hour in the specified time zone, compensating for any intervening leap seconds, so that the number of minutes and seconds past the hour is the same at the start and end.
Day
All days begin at the earliest possible time, which is usually 00:00:00 (midnight). One day (1d) is the interval between the start of the day and the start of the following day in the specified time zone, compensating for any intervening time changes.
Week
One week is the interval between the start day_of_week:hour:minute:second and the same day of the week and time of the following week in the specified time zone.
Month
One month is the interval between the start day of the month and time of day and the same day of the month and time of the following month in the specified time zone, so that the day of the month and time of day are the same at the start and end.
Quarter
One quarter is the interval between the start day of the month and time of day and the same day of the month and time of day three months later, so that the day of the month and time of day are the same at the start and end.
Year
One year is the interval between the start day of the month and time of day and the same day of the month and time of day the following year in the specified time zone, so that the date and time are the same at the start and end.
Trait Implementations
sourceimpl Clone for CalendarInterval
impl Clone for CalendarInterval
sourcefn clone(&self) -> CalendarInterval
fn clone(&self) -> CalendarInterval
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 CalendarInterval
impl Debug for CalendarInterval
sourceimpl Ord for CalendarInterval
impl Ord for CalendarInterval
sourceimpl PartialEq<CalendarInterval> for CalendarInterval
impl PartialEq<CalendarInterval> for CalendarInterval
sourceimpl PartialOrd<CalendarInterval> for CalendarInterval
impl PartialOrd<CalendarInterval> for CalendarInterval
sourcefn partial_cmp(&self, other: &CalendarInterval) -> Option<Ordering>
fn partial_cmp(&self, other: &CalendarInterval) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl Serialize for CalendarInterval
impl Serialize for CalendarInterval
impl Copy for CalendarInterval
impl Eq for CalendarInterval
impl StructuralEq for CalendarInterval
impl StructuralPartialEq for CalendarInterval
Auto Trait Implementations
impl RefUnwindSafe for CalendarInterval
impl Send for CalendarInterval
impl Sync for CalendarInterval
impl Unpin for CalendarInterval
impl UnwindSafe for CalendarInterval
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