pub struct Form {
pub id: Option<String>,
pub name: Option<String>,
pub action: Option<String>,
pub method: FormMethod,
pub enctype: Option<String>,
pub fields: Vec<FormField>,
pub form_type: FormType,
pub has_csrf: bool,
pub has_captcha: bool,
pub submit_text: Option<String>,
}Expand description
Represents an HTML form
Fields§
§id: Option<String>Form ID attribute
name: Option<String>Form name attribute
action: Option<String>Form action URL
method: FormMethodHTTP method (GET, POST)
enctype: Option<String>Encoding type
fields: Vec<FormField>Form fields
form_type: FormTypeDetected form type
has_csrf: boolWhether form has CSRF token
has_captcha: boolWhether form has captcha
submit_text: Option<String>Submit button text
Implementations§
Source§impl Form
impl Form
Sourcepub fn has_file_upload(&self) -> bool
pub fn has_file_upload(&self) -> bool
Check if form has file upload
Sourcepub fn required_fields(&self) -> Vec<&FormField>
pub fn required_fields(&self) -> Vec<&FormField>
Get required fields
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Form
impl<'de> Deserialize<'de> for Form
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 Form
Auto Trait Implementations§
impl Freeze for Form
impl RefUnwindSafe for Form
impl Send for Form
impl Sync for Form
impl Unpin for Form
impl UnwindSafe for Form
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