pub struct CheckboxField {
pub id: Option<String>,
pub label: String,
pub default_checked: bool,
pub required: bool,
pub readonly: bool,
pub conditional_validation: Option<ConditionalValidation>,
}Expand description
Boolean checkbox field.
Fields§
§id: Option<String>Optional unique identifier.
label: StringField label displayed to the user.
default_checked: boolDefault checked state.
required: boolWhether the field is required (must be checked).
readonly: boolWhether the field is read-only.
conditional_validation: Option<ConditionalValidation>Conditional validation based on another field’s value.
Implementations§
Source§impl CheckboxField
impl CheckboxField
Sourcepub fn with_conditional_validation(self, cv: ConditionalValidation) -> Self
pub fn with_conditional_validation(self, cv: ConditionalValidation) -> Self
Set conditional validation.
Trait Implementations§
Source§impl Clone for CheckboxField
impl Clone for CheckboxField
Source§fn clone(&self) -> CheckboxField
fn clone(&self) -> CheckboxField
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 moreSource§impl Debug for CheckboxField
impl Debug for CheckboxField
Source§impl<'de> Deserialize<'de> for CheckboxField
impl<'de> Deserialize<'de> for CheckboxField
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for CheckboxField
impl PartialEq for CheckboxField
Source§impl Serialize for CheckboxField
impl Serialize for CheckboxField
impl Eq for CheckboxField
impl StructuralPartialEq for CheckboxField
Auto Trait Implementations§
impl Freeze for CheckboxField
impl RefUnwindSafe for CheckboxField
impl Send for CheckboxField
impl Sync for CheckboxField
impl Unpin for CheckboxField
impl UnsafeUnpin for CheckboxField
impl UnwindSafe for CheckboxField
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.