pub struct RestDatesResponse { /* private fields */ }Expand description
Response structure for SiServer rest dates API.
SiServer provides company calendar information including various types of non-working days such as holidays, vacation days, and weekend days. Different date arrays represent different types of rest periods.
Implementationsยง
Sourceยงimpl RestDatesResponse
impl RestDatesResponse
Sourcepub fn unique_dates(&self) -> Result<HashSet<NaiveDate>>
pub fn unique_dates(&self) -> Result<HashSet<NaiveDate>>
Parses and combines all rest dates into a single unified set.
This method processes all three categories of rest dates and combines them
into a single HashSet for easy lookup operations. Duplicate dates across
categories are automatically deduplicated.
ยงDate Format Handling
The API returns dates in โYYYY-MM-DDโ format. Invalid date strings are silently ignored to handle potential API inconsistencies gracefully.
ยงReturns
Result<HashSet<NaiveDate>>- Unified set of all rest dates
ยงErrors
Currently cannot fail, but returns Result for future error handling
such as date validation or API response verification.