pub struct Form<'a, B: Render> {
pub method: FormMethod,
pub action: &'a str,
pub class: &'a str,
pub csrf_token: Option<&'a str>,
pub body: B,
}Expand description
Strict-CSP HTML form that automatically injects <input type="hidden" name="_csrf">
on POST forms whenever a browser session is active — eliminating post-render <form
string mutation.
Fields§
§method: FormMethod§action: &'a str§class: &'a str§csrf_token: Option<&'a str>§body: BImplementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a, B> Forget for Form<'a, B>
impl<'a, B> Freeze for Form<'a, B>
impl<'a, B> Move for Form<'a, B>
impl<'a, B> RefUnwindSafe for Form<'a, B>where
B: RefUnwindSafe,
impl<'a, B> Send for Form<'a, B>
impl<'a, B> Sync for Form<'a, B>where
B: Sync,
impl<'a, B> Unpin for Form<'a, B>
impl<'a, B> UnsafeUnpin for Form<'a, B>
impl<'a, B> UnwindSafe for Form<'a, B>
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