#[non_exhaustive]pub enum CalendarSelect {
Single,
Range,
}Expand description
Selection behavior for CalendarState.
Defaults to Single, preserving the original
single-date pick. Switch to Range via
CalendarState::with_range for start/end range selection. Available
since 0.21.0.
§Example
use slt::{CalendarSelect, CalendarState};
let mut cal = CalendarState::from_ym(2024, 3);
assert_eq!(cal.mode(), CalendarSelect::Single);
cal.with_range();
assert_eq!(cal.mode(), CalendarSelect::Range);Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Trait Implementations§
Source§impl Clone for CalendarSelect
impl Clone for CalendarSelect
Source§fn clone(&self) -> CalendarSelect
fn clone(&self) -> CalendarSelect
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 moreSource§impl Debug for CalendarSelect
impl Debug for CalendarSelect
Source§impl Default for CalendarSelect
impl Default for CalendarSelect
Source§fn default() -> CalendarSelect
fn default() -> CalendarSelect
Returns the “default value” for a type. Read more
Source§impl PartialEq for CalendarSelect
impl PartialEq for CalendarSelect
Source§fn eq(&self, other: &CalendarSelect) -> bool
fn eq(&self, other: &CalendarSelect) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for CalendarSelect
impl Eq for CalendarSelect
impl StructuralPartialEq for CalendarSelect
Auto Trait Implementations§
impl Freeze for CalendarSelect
impl RefUnwindSafe for CalendarSelect
impl Send for CalendarSelect
impl Sync for CalendarSelect
impl Unpin for CalendarSelect
impl UnsafeUnpin for CalendarSelect
impl UnwindSafe for CalendarSelect
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.