AllDayRecurrence

AllDayRecurrence(id) :: # (opaque)

Stream identified all-day occurrences in source-date order. The window selects source dates, not timeline overlaps. Duration may extend beyond it. IDs pair the supplied series identity with each original Gregorian date.

new : id, DateRecurrence, Window, U64, ZoneRules -> Try(AllDayRecurrence(id), [InvalidDuration, EmptyWindow, ReversedWindow])

Create a cursor for positive-duration all-day events within a source-date window. Empty/reversed windows and zero days fail; actual zone interpretation is deferred until consumption.

collect : AllDayRecurrence(id), { work : Limits, max_occurrences : U64 } -> Try(Batch(id), [OutOfRange, OutsideValidity])

Materialize at most max_occurrences. Work budgets apply to the whole call, not separately to each emitted occurrence. Reaching output capacity returns Limited without looking ahead to prove End. Resume its cursor.

next : AllDayRecurrence(id), Limits -> Try(Next(id), [OutOfRange, OutsideValidity])

At most one date-cursor advance and one bounded zone-cursor advance. A pending occurrence resumes before any new date is consumed. Empty coverage still emits an occurrence; skipped civil days do not erase IDs.

outcomes : AllDayRecurrence(id), Limits -> Iter(Try(Next(id), [OutOfRange, OutsideValidity]))

Every advancement exposes its outcome. End, errors and Limited are terminal items; resume a Limited cursor explicitly with chosen budgets.

to_inspect : AllDayRecurrence(id) -> Str

Return a bounded diagnostic summary without advancing cursors or enumerating occurrences. Use typed accessors for application logic; this text is not a storage format.

Limits : { max_date_steps : U64, max_date_buffered : U64, max_zone_segments : U64, max_zone_members : U64 }

Separate budgets for date candidate work/storage and zone segment/member work. These limits apply per next call or across an entire collect call.

Limit : [DateWorkLimit, DateBufferLimit, ZoneWorkLimit, ZoneBufferLimit, OutputLimit]

Why collection stopped before proving completion. Resume the returned cursor after choosing an adequate budget.

Batch : {
    occurrences : List(AllDayOccurrence({ series : id, date : GregorianDate })),
    date_steps : U64,
    zone_segments : U64,
    status : [Complete, Limited({ cursor : AllDayRecurrence(id), reason : Limit })],
}

Collected identified events and work counters. Limited includes the cursor needed to continue the same series.

Next : {
    date_steps : U64,
    date_buffered : U64,
    zone_segments : U64,
    zone_buffered : U64,
    status : [End, Item({ occurrence : AllDayOccurrence({ series : id, date : GregorianDate }), cursor : AllDayRecurrence(id) }), Limited({ cursor : AllDayRecurrence(id), reason : Limit })],
}

One advancement: an event and continuation, End, or a resumable limit. Date and zone counters report work spent on this call.