pub struct CalendarItemState { /* private fields */ }Expand description
State exposed to a calendar item slot. Applications may use it solely to decorate the unstyled primitive; all interaction remains owned by base.
The fields are private and reached through the methods below, so that a new one can be added without breaking the item slots.
Implementations§
Source§impl CalendarItemState
impl CalendarItemState
Sourcepub fn new(kind: CalendarItemKind) -> Self
pub fn new(kind: CalendarItemKind) -> Self
Create a state for kind, with every flag off.
pub fn active(self, active: bool) -> Self
Sourcepub fn in_range(self, in_range: bool) -> Self
pub fn in_range(self, in_range: bool) -> Self
Set whether the item is between the two ends of a range selection.
Sourcepub fn muted(self, muted: bool) -> Self
pub fn muted(self, muted: bool) -> Self
Set whether the item is shown as secondary, e.g.: a weekday header or a day that belongs to the neighboring month.
pub fn disabled(self, disabled: bool) -> Self
pub fn today(self, today: bool) -> Self
pub fn kind(&self) -> CalendarItemKind
pub fn is_active(&self) -> bool
pub fn is_in_range(&self) -> bool
pub fn is_muted(&self) -> bool
pub fn is_disabled(&self) -> bool
pub fn is_today(&self) -> bool
Trait Implementations§
Source§impl Clone for CalendarItemState
impl Clone for CalendarItemState
Source§fn clone(&self) -> CalendarItemState
fn clone(&self) -> CalendarItemState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CalendarItemState
Auto Trait Implementations§
impl Freeze for CalendarItemState
impl RefUnwindSafe for CalendarItemState
impl Send for CalendarItemState
impl Sync for CalendarItemState
impl Unpin for CalendarItemState
impl UnsafeUnpin for CalendarItemState
impl UnwindSafe for CalendarItemState
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
Converts
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> ⓘ
Converts
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