pub struct Config<S, G, V>(/* private fields */);
Available on crate feature
csrf
only.Expand description
A configuration for CsrfMiddleware
.
Implementations§
Source§impl<S, G, V> Config<S, G, V>
impl<S, G, V> Config<S, G, V>
Sourcepub const CSRF_TOKEN: &'static str = "x-csrf-token"
pub const CSRF_TOKEN: &'static str = "x-csrf-token"
The name of CSRF header.
Sourcepub fn new(
store: Store,
ignored_methods: HashSet<Method>,
cookie_options: CookieOptions,
secret: S,
generate: G,
verify: V,
) -> Self
pub fn new( store: Store, ignored_methods: HashSet<Method>, cookie_options: CookieOptions, secret: S, generate: G, verify: V, ) -> Self
Creates a new configuration.
Trait Implementations§
Source§impl<S, G, V> Cookieable for Config<S, G, V>
impl<S, G, V> Cookieable for Config<S, G, V>
Source§fn options(&self) -> &CookieOptions
fn options(&self) -> &CookieOptions
Available on crate features
cookie
and cookie-private
only.Gets the options of the cookie.
Available on crate features
cookie
and cookie-private
only.Gets a cookie from the cookies.
Available on crate features
cookie
and cookie-private
only.Deletes a cookie from the cookies.
Available on crate features
cookie
and cookie-private
only.Sets a cookie from the cookies.
Auto Trait Implementations§
impl<S, G, V> Freeze for Config<S, G, V>
impl<S, G, V> RefUnwindSafe for Config<S, G, V>
impl<S, G, V> Send for Config<S, G, V>
impl<S, G, V> Sync for Config<S, G, V>
impl<S, G, V> Unpin for Config<S, G, V>
impl<S, G, V> UnwindSafe for Config<S, G, V>
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