pub struct FormField {
pub name: String,
pub label: String,
pub field_type: String,
pub required: bool,
pub placeholder: Option<String>,
}Expand description
A field within a CanvasElement::Form.
Fields§
§name: StringMachine-readable field name (used as the key in form submission).
label: StringHuman-readable label shown to the user.
field_type: StringThe HTML input type (e.g., “text”, “email”, “number”).
required: boolWhether this field must be filled before submission.
placeholder: Option<String>Placeholder text shown when the field is empty.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FormField
impl<'de> Deserialize<'de> for FormField
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
impl StructuralPartialEq for FormField
Auto Trait Implementations§
impl Freeze for FormField
impl RefUnwindSafe for FormField
impl Send for FormField
impl Sync for FormField
impl Unpin for FormField
impl UnsafeUnpin for FormField
impl UnwindSafe for FormField
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