pub struct Calendars {
pub time_zone: String,
pub definitions: BTreeMap<String, CalendarDefinition>,
pub kinds: KindCalendars,
pub actors: BTreeMap<String, String>,
pub default_executor: ActorKind,
pub verifier: ActorKind,
}Expand description
Workspace calendars; present only when some work follows working time.
Fields§
§time_zone: StringIANA time zone in which weekly hours and exception dates are read.
definitions: BTreeMap<String, CalendarDefinition>Named calendars; standard may be redefined, always may not.
kinds: KindCalendarsCalendar of each actor kind unless a task or actor entry says otherwise.
actors: BTreeMap<String, String>Availability of named actors, keyed kind:name; availability only, never capacity.
default_executor: ActorKindActor kind expected to do work that neither names an executor nor has an owner.
verifier: ActorKindActor kind that reviews submitted work; verification waits for its calendar.
Implementations§
Source§impl Calendars
impl Calendars
Sourcepub fn in_zone(time_zone: impl Into<String>) -> Self
pub fn in_zone(time_zone: impl Into<String>) -> Self
Calendars with Microsoft Project defaults in one time zone.
Sourcepub fn rules(&self, name: &str) -> Option<CalendarRules<'_>>
pub fn rules(&self, name: &str) -> Option<CalendarRules<'_>>
The rules of a named calendar, or None when the name is unknown.
Sourcepub fn zone(&self) -> Result<Tz, BeyondCalendar>
pub fn zone(&self) -> Result<Tz, BeyondCalendar>
Parsed time zone; validation guarantees it parses for a validated plan.
Sourcepub fn resolve(&self, work: &WorkItem) -> ResolvedCalendar
pub fn resolve(&self, work: &WorkItem) -> ResolvedCalendar
Calendar and executor kind of a work item: its own calendar, else its owner’s availability, else the calendar of its owner’s kind, planned executor or the default executor.
Sourcepub fn verifier_calendar(&self) -> &str
pub fn verifier_calendar(&self) -> &str
Name of the calendar reviews wait for.