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
提取出的 HTML 表单结构
Fields§
§id: Option<String>表单 id 属性
name: Option<String>表单 name 属性
action: Option<String>提交目标 URL(action 属性)
method: FormMethod提交方法
enctype: Option<String>编码类型
fields: Vec<FormField>表单中的字段列表
form_type: FormType推断的表单类型
has_csrf: bool是否包含 CSRF 令牌字段
has_captcha: bool是否包含验证码
submit_text: Option<String>提交按钮文本
Implementations§
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
Auto Trait Implementations§
impl Freeze for Form
impl RefUnwindSafe for Form
impl Send for Form
impl Sync for Form
impl Unpin for Form
impl UnsafeUnpin 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