pub struct CsrfTokenNames { /* private fields */ }Expand description
CSRF names adapted to Actix’s HTTP 0.2 header type. Validation remains in the shared core.
Implementations§
Source§impl CsrfTokenNames
impl CsrfTokenNames
Sourcepub fn new(
cookie_name: impl Into<String>,
header_name: impl AsRef<str>,
) -> Result<Self>
pub fn new( cookie_name: impl Into<String>, header_name: impl AsRef<str>, ) -> Result<Self>
Validates product names and adapts the validated header to Actix.
§Errors
Returns a classified error for invalid cookie/header names.
Configured cookie name.
Sourcepub fn header_name(&self) -> &HeaderName
pub fn header_name(&self) -> &HeaderName
Actix header name, preserving the existing transport API.
Sourcepub fn header_name_str(&self) -> &str
pub fn header_name_str(&self) -> &str
Canonical lowercase name for CORS and string-based header APIs.
Trait Implementations§
Source§impl Clone for CsrfTokenNames
impl Clone for CsrfTokenNames
Source§fn clone(&self) -> CsrfTokenNames
fn clone(&self) -> CsrfTokenNames
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 CsrfTokenNames
impl Debug for CsrfTokenNames
Source§impl Default for CsrfTokenNames
impl Default for CsrfTokenNames
Source§impl PartialEq for CsrfTokenNames
impl PartialEq for CsrfTokenNames
impl Eq for CsrfTokenNames
impl StructuralPartialEq for CsrfTokenNames
Auto Trait Implementations§
impl !Freeze for CsrfTokenNames
impl RefUnwindSafe for CsrfTokenNames
impl Send for CsrfTokenNames
impl Sync for CsrfTokenNames
impl Unpin for CsrfTokenNames
impl UnsafeUnpin for CsrfTokenNames
impl UnwindSafe for CsrfTokenNames
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more