pub struct CalendarState {
pub minimum: Date,
pub maximum: Date,
pub selected: Date,
pub month: Date,
pub fixed_month: bool,
/* private fields */
}Fields§
§minimum: Date§maximum: Date§selected: Date§month: DateFirst day of the displayed month.
fixed_month: boolA MonthGrid whose viewport belongs to a fixed month in a larger view.
Implementations§
Source§impl CalendarState
impl CalendarState
pub fn from_node(node: &Node) -> Self
pub fn allows(&self, date: Date) -> bool
Sourcepub fn selectable_from(&self, date: Date, forward: bool) -> Option<Date>
pub fn selectable_from(&self, date: Date, forward: bool) -> Option<Date>
Find the first selectable day at or beyond the requested calendar position.
pub fn allows_month(&self, month: Date) -> bool
pub fn adjacent_month(&self, months: i64) -> Option<Date>
pub fn cursor(&self) -> Date
Sourcepub fn cells(&self, week_start: i64) -> [Option<Date>; 42]
pub fn cells(&self, week_start: i64) -> [Option<Date>; 42]
Six complete weeks starting on Monday (1) through Sunday (7).
pub fn shows(&self, date: Date, week_start: i64) -> bool
Trait Implementations§
Source§impl Clone for CalendarState
impl Clone for CalendarState
Source§impl Debug for CalendarState
impl Debug for CalendarState
impl Eq for CalendarState
Source§impl PartialEq for CalendarState
impl PartialEq for CalendarState
impl StructuralPartialEq for CalendarState
Auto Trait Implementations§
impl Forget for CalendarState
impl Freeze for CalendarState
impl Move for CalendarState
impl RefUnwindSafe for CalendarState
impl Send for CalendarState
impl Sync for CalendarState
impl Unpin for CalendarState
impl UnsafeUnpin for CalendarState
impl UnwindSafe for CalendarState
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