pub struct PickerConfigBuilder<T: HasDateConstraints + Default + Clone> { /* private fields */ }
Expand description
Builder for PickerConfig
.
Implementations§
Source§impl<T: HasDateConstraints + Default + Clone + Clone> PickerConfigBuilder<T>
impl<T: HasDateConstraints + Default + Clone + Clone> PickerConfigBuilder<T>
Sourcepub fn date_constraints(&mut self, value: T) -> &mut Self
pub fn date_constraints(&mut self, value: T) -> &mut Self
possible constraints to prevent the user from selecting some dates
Sourcepub fn initial_date(&mut self, value: NaiveDate) -> &mut Self
pub fn initial_date(&mut self, value: NaiveDate) -> &mut Self
initializes the datepicker to this value
Sourcepub fn initial_view_type(&mut self, value: DialogViewType) -> &mut Self
pub fn initial_view_type(&mut self, value: DialogViewType) -> &mut Self
initializes the view type to this value
Sourcepub fn selection_type(&mut self, value: DialogViewType) -> &mut Self
pub fn selection_type(&mut self, value: DialogViewType) -> &mut Self
selection type, to make it possible to select for example only a year, or only a month.
Sourcepub fn initially_opened(&mut self, value: bool) -> &mut Self
pub fn initially_opened(&mut self, value: bool) -> &mut Self
whether the dialog should be immediatelly opened after initalization
Sourcepub fn month_title_format<VALUE: Into<String>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn month_title_format<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self
chrono formatting string for the title of the month
Sourcepub fn build(&self) -> Result<PickerConfig<T>, PickerConfigBuilderError>
pub fn build(&self) -> Result<PickerConfig<T>, PickerConfigBuilderError>
Trait Implementations§
Source§impl<T: Clone + HasDateConstraints + Default + Clone> Clone for PickerConfigBuilder<T>
impl<T: Clone + HasDateConstraints + Default + Clone> Clone for PickerConfigBuilder<T>
Source§fn clone(&self) -> PickerConfigBuilder<T>
fn clone(&self) -> PickerConfigBuilder<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<T> Freeze for PickerConfigBuilder<T>where
T: Freeze,
impl<T> RefUnwindSafe for PickerConfigBuilder<T>where
T: RefUnwindSafe,
impl<T> Send for PickerConfigBuilder<T>where
T: Send,
impl<T> Sync for PickerConfigBuilder<T>where
T: Sync,
impl<T> Unpin for PickerConfigBuilder<T>where
T: Unpin,
impl<T> UnwindSafe for PickerConfigBuilder<T>where
T: 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
Mutably borrows from an owned value. Read more