pub struct AocTime { /* private fields */ }
Expand description
Represents the time configuration for Advent of Code puzzles
Implementations§
Source§impl AocTime
impl AocTime
Sourcepub fn current_year(&self) -> i32
pub fn current_year(&self) -> i32
Gets the current available year for Advent of Code
Sourcepub fn available_day(&self, year: i32) -> u8
pub fn available_day(&self, year: i32) -> u8
Gets the maximum available day for a given year
Sourcepub fn validate_year(&self, year: i32) -> Result<(), AocError>
pub fn validate_year(&self, year: i32) -> Result<(), AocError>
Validates if a given year is valid for Advent of Code
Sourcepub fn validate_date(&self, year: i32, day: u8) -> Result<(), AocError>
pub fn validate_date(&self, year: i32, day: u8) -> Result<(), AocError>
Validates if a given date (year and day) is valid for Advent of Code
Sourcepub fn is_puzzle_available(&self, year: i32, day: u8) -> bool
pub fn is_puzzle_available(&self, year: i32, day: u8) -> bool
Checks if a puzzle is currently available
Sourcepub fn puzzle_release_time(&self, year: i32, day: u8) -> DateTime<FixedOffset>
pub fn puzzle_release_time(&self, year: i32, day: u8) -> DateTime<FixedOffset>
Gets the release time for a specific puzzle
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AocTime
impl RefUnwindSafe for AocTime
impl Send for AocTime
impl Sync for AocTime
impl Unpin for AocTime
impl UnwindSafe for AocTime
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