Skip to main content

ingest_calendar

Function ingest_calendar 

pub fn ingest_calendar(spec: &CalendarSpec) -> Result<(), CalendarIngestError>
Expand description

Binds spec.code to a calendar built from spec, process-wide.

The binding overrides: a code already ingested is replaced, and a shipped centre or market of the same code (or one its alias spells) is shadowed — always, with no refusal. Every memoised composite naming the code is dropped, so every resolution afterwards answers with the ingested calendar.

No calendar anyone holds changes: a product drafted before the ingest keeps the handle it resolved and the dates it rolled. Ingest calendars before drafting the trades that should roll on them.

§Errors

CalendarIngestError for an empty or compound code, or a reserved one.

§Panics

If a calendar lock is poisoned by a panic elsewhere.