#[non_exhaustive]pub enum Period {
RollingPeriod(Box<Duration>),
CalendarPeriod(CalendarPeriod),
}Expand description
The time period over which the objective will be evaluated.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
RollingPeriod(Box<Duration>)
A rolling time period, semantically “in the past <rolling_period>”.
Must be an integer multiple of 1 day no larger than 30 days.
CalendarPeriod(CalendarPeriod)
A calendar period, semantically “since the start of the current
<calendar_period>”. At this time, only DAY, WEEK, FORTNIGHT, and
MONTH are supported.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Period
impl<'de> Deserialize<'de> for Period
Source§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
impl StructuralPartialEq for Period
Auto Trait Implementations§
impl Freeze for Period
impl RefUnwindSafe for Period
impl Send for Period
impl Sync for Period
impl Unpin for Period
impl UnwindSafe for Period
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more