pub enum PollCadence {
Every(Duration),
Calendar {
expression: String,
zone: Option<String>,
},
}Expand description
The clock ONE poll entry runs on — an interval, or a calendar expression.
An enum rather than two options, because the grammar makes them exclusive: an entry writes
every = "…" or cron = "…" and never both or neither, so a pair of Options would leave two
states nothing means.
Variants§
Every(Duration)
every = "…" — a fixed interval, read by the ONE duration grammar (crate::duration) and
already known to be positive.
Calendar
cron = "…" — a calendar expression, with the zone it is read in.
Trait Implementations§
Source§impl Clone for PollCadence
impl Clone for PollCadence
Auto Trait Implementations§
impl Freeze for PollCadence
impl RefUnwindSafe for PollCadence
impl Send for PollCadence
impl Sync for PollCadence
impl Unpin for PollCadence
impl UnsafeUnpin for PollCadence
impl UnwindSafe for PollCadence
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