Trait chrono_datepicker_core::config::date_constraints::HasDateConstraints [−][src]
pub trait HasDateConstraints { fn is_day_forbidden(&self, date: &NaiveDate) -> bool; fn is_month_forbidden(&self, year_month_info: &NaiveDate) -> bool; fn is_year_forbidden(&self, year: i32) -> bool; fn is_year_group_forbidden(&self, year: i32) -> bool; }
Trait that can be implemented to create your own date constraints.
Required methods
fn is_day_forbidden(&self, date: &NaiveDate) -> bool
[src]
Returns true if the given date is forbidden.
fn is_month_forbidden(&self, year_month_info: &NaiveDate) -> bool
[src]
Returns true if the entire month described by year_month_info is forbidden.
fn is_year_forbidden(&self, year: i32) -> bool
[src]
Returns true if the entire given year is forbidden.
fn is_year_group_forbidden(&self, year: i32) -> bool
[src]
Returns true if the entire group of years including the given year is forbidden. A group of years are inclusive intervals [1980, 1999], [2000, 2019], [2020, 2039], …
Implementors
impl HasDateConstraints for DateConstraints
[src]
impl HasDateConstraints for DateConstraints
[src]fn is_day_forbidden(&self, date: &NaiveDate) -> bool
[src]
fn is_month_forbidden(&self, year_month_info: &NaiveDate) -> bool
[src]
fn is_year_forbidden(&self, year: i32) -> bool
[src]
fn is_year_group_forbidden(&self, year: i32) -> bool
[src]
impl<T: HasDateConstraints + Default + Clone> HasDateConstraints for PickerConfig<T>
[src]
impl<T: HasDateConstraints + Default + Clone> HasDateConstraints for PickerConfig<T>
[src]