pub struct CsrfCookieConfig { /* private fields */ }Expand description
Configuration struct for CsrfCookie.
Implementations§
Source§impl CsrfCookieConfig
impl CsrfCookieConfig
Sourcepub const fn new(cookie_name: String) -> Self
pub const fn new(cookie_name: String) -> Self
Sets the cookie name. Consider using with_host_prefix or
with_secure_prefix if possible for increased security.
Sourcepub fn with_host_prefix(cookie_name: String) -> Self
pub fn with_host_prefix(cookie_name: String) -> Self
Sets the cookie name, prefixing it with __Host- if it wasn’t already
prefixed. Note that this requires the cookie to be served with the
secure flag, must be set over HTTPS, must not have a domain specified,
and the path must be /.
Sourcepub fn with_secure_prefix(cookie_name: String) -> Self
pub fn with_secure_prefix(cookie_name: String) -> Self
Sets the cookie name, prefixing it with __Secure- if it wasn’t already
prefixed. Note that this requires the cookie to be served with the
secure flag.
Trait Implementations§
Source§impl Clone for CsrfCookieConfig
impl Clone for CsrfCookieConfig
Source§fn clone(&self) -> CsrfCookieConfig
fn clone(&self) -> CsrfCookieConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CsrfCookieConfig
impl Debug for CsrfCookieConfig
Source§impl Default for CsrfCookieConfig
impl Default for CsrfCookieConfig
Source§impl Hash for CsrfCookieConfig
impl Hash for CsrfCookieConfig
Source§impl Ord for CsrfCookieConfig
impl Ord for CsrfCookieConfig
Source§fn cmp(&self, other: &CsrfCookieConfig) -> Ordering
fn cmp(&self, other: &CsrfCookieConfig) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for CsrfCookieConfig
impl PartialEq for CsrfCookieConfig
Source§impl PartialOrd for CsrfCookieConfig
impl PartialOrd for CsrfCookieConfig
impl Eq for CsrfCookieConfig
impl StructuralPartialEq for CsrfCookieConfig
Auto Trait Implementations§
impl Freeze for CsrfCookieConfig
impl RefUnwindSafe for CsrfCookieConfig
impl Send for CsrfCookieConfig
impl Sync for CsrfCookieConfig
impl Unpin for CsrfCookieConfig
impl UnwindSafe for CsrfCookieConfig
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
Source§impl<T> CallHasher for T
impl<T> CallHasher for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.