Struct seed_datepicker::config::PickerConfigBuilder
source · [−]pub struct PickerConfigBuilder<T> where
T: HasDateConstraints + Default + Clone, { /* private fields */ }
Expand description
Builder for PickerConfig
.
Implementations
sourceimpl<T> PickerConfigBuilder<T> where
T: HasDateConstraints + Default + Clone,
impl<T> PickerConfigBuilder<T> where
T: HasDateConstraints + Default + Clone,
sourcepub fn date_constraints(&mut self, value: T) -> &mut PickerConfigBuilder<T>
pub fn date_constraints(&mut self, value: T) -> &mut PickerConfigBuilder<T>
possible constraints to prevent the user from selecting some dates
sourcepub fn initial_date(&mut self, value: NaiveDate) -> &mut PickerConfigBuilder<T>
pub fn initial_date(&mut self, value: NaiveDate) -> &mut PickerConfigBuilder<T>
initializes the datepicker to this value
sourcepub fn initial_view_type(
&mut self,
value: DialogViewType
) -> &mut PickerConfigBuilder<T>
pub fn initial_view_type(
&mut self,
value: DialogViewType
) -> &mut PickerConfigBuilder<T>
initializes the view type to this value
sourcepub fn selection_type(
&mut self,
value: DialogViewType
) -> &mut PickerConfigBuilder<T>
pub fn selection_type(
&mut self,
value: DialogViewType
) -> &mut PickerConfigBuilder<T>
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 PickerConfigBuilder<T>
pub fn initially_opened(&mut self, value: bool) -> &mut PickerConfigBuilder<T>
whether the dialog should be immediatelly opened after initalization
sourcepub fn month_title_format<VALUE>(
&mut self,
value: VALUE
) -> &mut PickerConfigBuilder<T> where
VALUE: Into<String>,
pub fn month_title_format<VALUE>(
&mut self,
value: VALUE
) -> &mut PickerConfigBuilder<T> where
VALUE: Into<String>,
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
sourceimpl<T> Clone for PickerConfigBuilder<T> where
T: Clone + HasDateConstraints + Default,
impl<T> Clone for PickerConfigBuilder<T> where
T: Clone + HasDateConstraints + Default,
sourcefn clone(&self) -> PickerConfigBuilder<T>
fn clone(&self) -> PickerConfigBuilder<T>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<T> Default for PickerConfigBuilder<T> where
T: HasDateConstraints + Default + Clone,
impl<T> Default for PickerConfigBuilder<T> where
T: HasDateConstraints + Default + Clone,
sourcefn default() -> PickerConfigBuilder<T>
fn default() -> PickerConfigBuilder<T>
Returns the “default value” for a type. Read more
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more