pub struct WeekLayout {
pub dates: Vec<NaiveDate>,
pub month_start_idx: Option<(usize, u32)>,
pub month_end_idx: Option<(usize, u32)>,
pub year_boundary_idx: Option<usize>,
}Fields§
§dates: Vec<NaiveDate>§month_start_idx: Option<(usize, u32)>§month_end_idx: Option<(usize, u32)>§year_boundary_idx: Option<usize>Implementations§
Source§impl WeekLayout
impl WeekLayout
pub fn new(start_date: NaiveDate) -> Self
pub fn get_date(&self, idx: usize) -> Option<NaiveDate>
pub fn get_first_date(&self) -> NaiveDate
pub fn get_last_date(&self) -> NaiveDate
pub fn contains_month_start(&self) -> bool
pub fn contains_month_end(&self) -> bool
pub fn is_in_current_month( &self, idx: usize, year: i32, current_month: Option<u32>, ) -> bool
pub fn was_prev_in_month( &self, idx: usize, year: i32, current_month: Option<u32>, ) -> bool
pub fn will_next_be_in_month( &self, idx: usize, year: i32, current_month: Option<u32>, ) -> bool
pub fn count_days_in_month(&self, month: u32) -> usize
Trait Implementations§
Source§impl Clone for WeekLayout
impl Clone for WeekLayout
Source§fn clone(&self) -> WeekLayout
fn clone(&self) -> WeekLayout
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 moreAuto Trait Implementations§
impl Freeze for WeekLayout
impl RefUnwindSafe for WeekLayout
impl Send for WeekLayout
impl Sync for WeekLayout
impl Unpin for WeekLayout
impl UnwindSafe for WeekLayout
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