Struct chrono_datepicker_core::config::date_constraints::DateConstraintsBuilder[][src]

pub struct DateConstraintsBuilder { /* fields omitted */ }

Builder for DateConstraints.

Implementations

impl DateConstraintsBuilder[src]

pub fn min_date(&mut self, value: NaiveDate) -> &mut Self[src]

inclusive minimal date constraint the earliest date that can be selected

pub fn max_date(&mut self, value: NaiveDate) -> &mut Self[src]

inclusive maximal date constraint the latest date that can be selected

pub fn disabled_weekdays(&mut self, value: HashSet<Weekday>) -> &mut Self[src]

disabled weekdays, that should not be selectable

pub fn disabled_months(&mut self, value: HashSet<Month>) -> &mut Self[src]

entire completely disabled months in every year

pub fn disabled_years(&mut self, value: HashSet<i32>) -> &mut Self[src]

entire completely disabled years

pub fn disabled_monthly_dates(&mut self, value: HashSet<u32>) -> &mut Self[src]

disabled monthly periodically repeating dates, so it is just a day number starting from 1 for the first day of the month if unique dates in a certain year should not be selectable use disabled_unique_dates

pub fn disabled_yearly_dates(&mut self, value: Vec<NaiveDate>) -> &mut Self[src]

disabled yearly periodically repeating dates that should not be selectable, if unique dates in a certain year should not be selectable use disabled_unique_dates it is a Vec since we need to iterate over it anyway, since we hae no MonthDay type

pub fn disabled_unique_dates(&mut self, value: HashSet<NaiveDate>) -> &mut Self[src]

disabled unique dates with a specific year, month and day that should not be selectable, if some periodically repeated dates should not be selectable use the correct option

pub fn build(&self) -> Result<DateConstraints, String>[src]

Builds a new DateConstraints.

Errors

If a required field has not been initialized.

Trait Implementations

impl Clone for DateConstraintsBuilder[src]

impl Default for DateConstraintsBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.