pub enum MonthFilter {
All,
Single(u32),
Current,
CurrentWithFollowing(u32),
}Variants§
Implementations§
Source§impl MonthFilter
impl MonthFilter
Sourcepub fn from_cli_args(
month: Option<&str>,
following_months: Option<u32>,
) -> Result<Self, String>
pub fn from_cli_args( month: Option<&str>, following_months: Option<u32>, ) -> Result<Self, String>
Create MonthFilter from CLI arguments
Sourcepub fn get_month_range(&self, _year: i32) -> (u32, u32)
pub fn get_month_range(&self, _year: i32) -> (u32, u32)
Get the range of months to display (start_month, end_month) for the given year
Sourcepub fn should_display_month(&self, month: u32, year: i32) -> bool
pub fn should_display_month(&self, month: u32, year: i32) -> bool
Check if a specific month should be displayed
Sourcepub fn get_date_range(&self, year: i32) -> (NaiveDate, NaiveDate)
pub fn get_date_range(&self, year: i32) -> (NaiveDate, NaiveDate)
Get the filtered date range (start_date, end_date) for rendering
Trait Implementations§
Source§impl Clone for MonthFilter
impl Clone for MonthFilter
Source§fn clone(&self) -> MonthFilter
fn clone(&self) -> MonthFilter
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MonthFilter
impl Debug for MonthFilter
Source§impl PartialEq for MonthFilter
impl PartialEq for MonthFilter
impl Eq for MonthFilter
impl StructuralPartialEq for MonthFilter
Auto Trait Implementations§
impl Freeze for MonthFilter
impl RefUnwindSafe for MonthFilter
impl Send for MonthFilter
impl Sync for MonthFilter
impl Unpin for MonthFilter
impl UnwindSafe for MonthFilter
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.