pub struct AdvancedFormField {
pub name: String,
pub field_type: String,
pub label: String,
pub required: bool,
pub options: Option<Vec<String>>,
pub min: Option<f64>,
pub max: Option<f64>,
pub placeholder: Option<String>,
}Expand description
A field within a CanvasElement::FormAdvanced with richer type info.
Fields§
§name: StringMachine-readable field name.
field_type: StringThe field type: “text”, “number”, “select”, “checkbox”, “textarea”.
label: StringHuman-readable label.
required: boolWhether this field is required.
options: Option<Vec<String>>Options for select fields.
min: Option<f64>Minimum value for number fields.
max: Option<f64>Maximum value for number fields.
placeholder: Option<String>Placeholder text.
Trait Implementations§
Source§impl Clone for AdvancedFormField
impl Clone for AdvancedFormField
Source§fn clone(&self) -> AdvancedFormField
fn clone(&self) -> AdvancedFormField
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 AdvancedFormField
impl Debug for AdvancedFormField
Source§impl<'de> Deserialize<'de> for AdvancedFormField
impl<'de> Deserialize<'de> for AdvancedFormField
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 AdvancedFormField
impl PartialEq for AdvancedFormField
Source§impl Serialize for AdvancedFormField
impl Serialize for AdvancedFormField
impl StructuralPartialEq for AdvancedFormField
Auto Trait Implementations§
impl Freeze for AdvancedFormField
impl RefUnwindSafe for AdvancedFormField
impl Send for AdvancedFormField
impl Sync for AdvancedFormField
impl Unpin for AdvancedFormField
impl UnsafeUnpin for AdvancedFormField
impl UnwindSafe for AdvancedFormField
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