pub struct ScheduleDefinition {
pub name: String,
pub handler: String,
pub spec: ScheduleSpec,
pub timezone: Option<String>,
pub overlap: Overlap,
pub catch_up: CatchUp,
pub job: Option<JobConfig>,
pub timeout_secs: Option<u32>,
}Expand description
A handler the platform runs on a timetable, once per fire across every replica.
Fields§
§name: String§handler: String§spec: ScheduleSpec§timezone: Option<String>The IANA time zone a cron expression is read in; UTC when unset.
overlap: Overlap§catch_up: CatchUp§job: Option<JobConfig>Run each fire as a job on a worker instead of inline.
timeout_secs: Option<u32>The inline handler’s execution budget; 60 s when unset.
Implementations§
Source§impl ScheduleDefinition
impl ScheduleDefinition
pub const NAME_MAX: usize = 64
pub const DEFAULT_TIMEOUT_SECS: u32 = 60
Sourcepub const TIMEOUT_SECS: RangeInclusive<u32>
pub const TIMEOUT_SECS: RangeInclusive<u32>
The range timeout_secs must fall in.
Sourcepub const MIN_INTERVAL_SECS: u32 = 10
pub const MIN_INTERVAL_SECS: u32 = 10
The shortest interval between two fires.
Sourcepub fn new(
name: impl Into<String>,
handler: impl Into<String>,
spec: ScheduleSpec,
) -> Self
pub fn new( name: impl Into<String>, handler: impl Into<String>, spec: ScheduleSpec, ) -> Self
A schedule with the platform’s defaults: a handler run inline, in UTC, that skips a fire while the last one runs.
Sourcepub fn is_valid_name(name: &str) -> bool
pub fn is_valid_name(name: &str) -> bool
^[a-z0-9_]{1,64}$
Sourcepub fn derived_features(&self) -> impl Iterator<Item = &'static str>
pub fn derived_features(&self) -> impl Iterator<Item = &'static str>
Platform features this schedule’s declaration requires beyond
schedules itself.
Trait Implementations§
Source§impl Clone for ScheduleDefinition
impl Clone for ScheduleDefinition
Source§impl Debug for ScheduleDefinition
impl Debug for ScheduleDefinition
Source§impl<'de> Deserialize<'de> for ScheduleDefinition
impl<'de> Deserialize<'de> for ScheduleDefinition
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 Eq for ScheduleDefinition
Source§impl PartialEq for ScheduleDefinition
impl PartialEq for ScheduleDefinition
Source§impl Serialize for ScheduleDefinition
impl Serialize for ScheduleDefinition
impl StructuralPartialEq for ScheduleDefinition
Auto Trait Implementations§
impl Freeze for ScheduleDefinition
impl RefUnwindSafe for ScheduleDefinition
impl Send for ScheduleDefinition
impl Sync for ScheduleDefinition
impl Unpin for ScheduleDefinition
impl UnsafeUnpin for ScheduleDefinition
impl UnwindSafe for ScheduleDefinition
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