pub struct CsrfToken(/* private fields */);Expand description
Request-scoped CSRF token made available to handlers rendering forms.
On the first GET or HEAD request this is the same token that the
middleware writes to the response cookie. Exposing it through request extensions avoids
rendering an empty hidden field before the browser has received that cookie.
Implementations§
Trait Implementations§
impl Eq for CsrfToken
impl StructuralPartialEq for CsrfToken
Auto Trait Implementations§
impl Freeze for CsrfToken
impl RefUnwindSafe for CsrfToken
impl Send for CsrfToken
impl Sync for CsrfToken
impl Unpin for CsrfToken
impl UnsafeUnpin for CsrfToken
impl UnwindSafe for CsrfToken
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