automata/cron/iterator

Types

Cron iterator state. opaque because the cursor must stay synchronised with the embedded plan; constructing one with an arbitrary cursor would skip occurrences.

pub opaque type CronIterator

Outcome of one step on a CronIterator.

Yield(at:, next:) carries the next occurrence and a fresh iterator positioned just after it. Done means the search hit its guard of 5,000,000 steps, where one step skips a month, day or hour that cannot match or moves one minute ahead. A plan from a validated ValidCron fires forever, so it yields rather than reaching Done.

pub type Step {
  Yield(at: ast.ValidDateTime, next: CronIterator)
  Done
}

Constructors

Values

pub fn after(
  plan plan: normalize.CronPlan,
  boundary boundary: ast.Boundary,
) -> CronIterator
pub fn step(iterator: CronIterator) -> Step
✨ Search Document