pub struct SwitchProps {
pub field: String,
pub label: String,
pub description: Option<String>,
pub checked: Option<bool>,
pub data_path: Option<String>,
pub required: Option<bool>,
pub disabled: Option<bool>,
pub error: Option<String>,
pub action: Option<Action>,
}Expand description
Props for Switch component.
Fields§
§field: StringForm field name for data binding.
label: String§description: Option<String>§checked: Option<bool>§data_path: Option<String>Data path for pre-filling from handler data (e.g., “/data/user/name”).
required: Option<bool>§disabled: Option<bool>§error: Option<String>§action: Option<Action>Auto-submit action. When set, the switch renders inside a minimal form and submits on change.
Trait Implementations§
Source§impl Clone for SwitchProps
impl Clone for SwitchProps
Source§fn clone(&self) -> SwitchProps
fn clone(&self) -> SwitchProps
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 SwitchProps
impl Debug for SwitchProps
Source§impl<'de> Deserialize<'de> for SwitchProps
impl<'de> Deserialize<'de> for SwitchProps
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 SwitchProps
impl PartialEq for SwitchProps
Source§impl Serialize for SwitchProps
impl Serialize for SwitchProps
impl StructuralPartialEq for SwitchProps
Auto Trait Implementations§
impl Freeze for SwitchProps
impl RefUnwindSafe for SwitchProps
impl Send for SwitchProps
impl Sync for SwitchProps
impl Unpin for SwitchProps
impl UnsafeUnpin for SwitchProps
impl UnwindSafe for SwitchProps
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