pub struct FormField {
pub id: String,
pub label: String,
pub style: FieldStyle,
pub required: bool,
pub placeholder: Option<String>,
pub min_len: Option<u16>,
pub max_len: Option<u16>,
}Expand description
One text field of a Form.
Fields§
§id: StringKey of the value in the answer.
label: StringLabel shown above the field.
style: FieldStyleOne line or several.
required: boolThe person must fill it in.
placeholder: Option<String>Hint shown in the empty field.
min_len: Option<u16>Minimum length.
max_len: Option<u16>Maximum length.
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 Eq for FormField
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