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.