Struct CalendarSpec
pub struct CalendarSpec {
pub code: String,
pub holidays: Vec<NaiveDate>,
pub weekmask: [bool; 7],
}Expand description
A calendar stated as data, for ingestion: the code it binds, the holidays it closes, and the weekdays that are not business days.
Fields§
§code: StringThe code the calendar binds — a new one, or a shipped centre’s to override it.
holidays: Vec<NaiveDate>The dates closed beyond the weekend.
weekmask: [bool; 7]Indexed Monday = 0 .. Sunday = 6; true marks a weekend day.
Implementations§
§impl CalendarSpec
impl CalendarSpec
Trait Implementations§
§impl Clone for CalendarSpec
impl Clone for CalendarSpec
§fn clone(&self) -> CalendarSpec
fn clone(&self) -> CalendarSpec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for CalendarSpec
impl Debug for CalendarSpec
impl Eq for CalendarSpec
§impl PartialEq for CalendarSpec
impl PartialEq for CalendarSpec
impl StructuralPartialEq for CalendarSpec
Auto Trait Implementations§
impl Freeze for CalendarSpec
impl RefUnwindSafe for CalendarSpec
impl Send for CalendarSpec
impl Sync for CalendarSpec
impl Unpin for CalendarSpec
impl UnsafeUnpin for CalendarSpec
impl UnwindSafe for CalendarSpec
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