pub struct Monthly<'a, DS: DateStyler> { /* private fields */ }
Expand description
Display a month calendar for the month containing display_date
Implementations§
Source§impl<'a, DS: DateStyler> Monthly<'a, DS>
impl<'a, DS: DateStyler> Monthly<'a, DS>
Sourcepub const fn new(display_date: Date, events: DS) -> Self
pub const fn new(display_date: Date, events: DS) -> Self
Construct a calendar for the display_date
and highlight the events
Sourcepub fn show_surrounding<S: Into<Style>>(self, style: S) -> Self
pub fn show_surrounding<S: Into<Style>>(self, style: S) -> Self
Fill the calendar slots for days not in the current month also, this causes each line to be completely filled. If there is an event style for a date, this style will be patched with the event’s style
style
accepts any type that is convertible to Style
(e.g. Style
, Color
, or
your own type that implements Into<Style>
).
Sourcepub fn show_weekdays_header<S: Into<Style>>(self, style: S) -> Self
pub fn show_weekdays_header<S: Into<Style>>(self, style: S) -> Self
Display a header containing weekday abbreviations
style
accepts any type that is convertible to Style
(e.g. Style
, Color
, or
your own type that implements Into<Style>
).
Sourcepub fn show_month_header<S: Into<Style>>(self, style: S) -> Self
pub fn show_month_header<S: Into<Style>>(self, style: S) -> Self
Display a header containing the month and year
style
accepts any type that is convertible to Style
(e.g. Style
, Color
, or
your own type that implements Into<Style>
).
Sourcepub fn default_style<S: Into<Style>>(self, style: S) -> Self
pub fn default_style<S: Into<Style>>(self, style: S) -> Self
How to render otherwise unstyled dates
style
accepts any type that is convertible to Style
(e.g. Style
, Color
, or
your own type that implements Into<Style>
).
Trait Implementations§
Source§impl<DS: DateStyler> Widget for Monthly<'_, DS>
impl<DS: DateStyler> Widget for Monthly<'_, DS>
Source§impl<DS: DateStyler> WidgetRef for Monthly<'_, DS>
impl<DS: DateStyler> WidgetRef for Monthly<'_, DS>
Source§fn render_ref(&self, area: Rect, buf: &mut Buffer)
fn render_ref(&self, area: Rect, buf: &mut Buffer)
impl<'a, DS: Eq + DateStyler> Eq for Monthly<'a, DS>
impl<'a, DS: DateStyler> StructuralPartialEq for Monthly<'a, DS>
Auto Trait Implementations§
impl<'a, DS> Freeze for Monthly<'a, DS>where
DS: Freeze,
impl<'a, DS> RefUnwindSafe for Monthly<'a, DS>where
DS: RefUnwindSafe,
impl<'a, DS> Send for Monthly<'a, DS>where
DS: Send,
impl<'a, DS> Sync for Monthly<'a, DS>where
DS: Sync,
impl<'a, DS> Unpin for Monthly<'a, DS>where
DS: Unpin,
impl<'a, DS> UnwindSafe for Monthly<'a, DS>where
DS: UnwindSafe,
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more