pub struct FormInfo {
pub selector: String,
pub name: Option<String>,
pub action: Option<String>,
pub method: Option<String>,
pub fields: Vec<FormField>,
pub description: String,
}Expand description
Information about a form on the page.
Fields§
§selector: StringCSS selector for the form.
name: Option<String>Form name attribute.
action: Option<String>Form action URL.
method: Option<String>Form method (GET, POST).
fields: Vec<FormField>Form fields.
description: StringDescription of what this form does.
Implementations§
Source§impl FormInfo
impl FormInfo
Sourcepub fn with_action(self, action: impl Into<String>) -> Self
pub fn with_action(self, action: impl Into<String>) -> Self
Set action.
Sourcepub fn required_fields(&self) -> Vec<&FormField>
pub fn required_fields(&self) -> Vec<&FormField>
Get required fields.
Sourcepub fn empty_required_fields(&self) -> Vec<&FormField>
pub fn empty_required_fields(&self) -> Vec<&FormField>
Get empty required fields.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FormInfo
impl<'de> Deserialize<'de> for FormInfo
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
Auto Trait Implementations§
impl Freeze for FormInfo
impl RefUnwindSafe for FormInfo
impl Send for FormInfo
impl Sync for FormInfo
impl Unpin for FormInfo
impl UnwindSafe for FormInfo
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