pub struct CsrfTokenRef(/* private fields */);
Expand description
A Csrf Token
Implementations§
Source§impl CsrfTokenRef
impl CsrfTokenRef
Sourcepub const fn from_str(raw: &str) -> &Self
pub const fn from_str(raw: &str) -> &Self
Transparently reinterprets the string slice as a strongly-typed CsrfTokenRef
Sourcepub const fn from_static(raw: &'static str) -> &'static Self
pub const fn from_static(raw: &'static str) -> &'static Self
Transparently reinterprets the static string slice as a strongly-typed CsrfTokenRef
Sourcepub fn into_owned(self: Box<CsrfTokenRef>) -> CsrfToken
pub fn into_owned(self: Box<CsrfTokenRef>) -> CsrfToken
Converts a Box<CsrfTokenRef>
into a CsrfToken
without copying or allocating
Source§impl CsrfTokenRef
impl CsrfTokenRef
Sourcepub fn secret(&self) -> &str
pub fn secret(&self) -> &str
Get the secret from this string.
This function is the same as CsrfToken::as_str
, but has another name for searchability, prefer to use this function.
Trait Implementations§
Source§impl AsRef<CsrfTokenRef> for CsrfToken
impl AsRef<CsrfTokenRef> for CsrfToken
Source§fn as_ref(&self) -> &CsrfTokenRef
fn as_ref(&self) -> &CsrfTokenRef
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl AsRef<str> for CsrfTokenRef
impl AsRef<str> for CsrfTokenRef
Source§impl Borrow<CsrfTokenRef> for CsrfToken
impl Borrow<CsrfTokenRef> for CsrfToken
Source§fn borrow(&self) -> &CsrfTokenRef
fn borrow(&self) -> &CsrfTokenRef
Immutably borrows from an owned value. Read more
Source§impl Borrow<str> for CsrfTokenRef
impl Borrow<str> for CsrfTokenRef
Source§impl Debug for CsrfTokenRef
impl Debug for CsrfTokenRef
Source§impl<'de: 'a, 'a> Deserialize<'de> for &'a CsrfTokenRef
impl<'de: 'a, 'a> Deserialize<'de> for &'a CsrfTokenRef
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'de> Deserialize<'de> for Box<CsrfTokenRef>
impl<'de> Deserialize<'de> for Box<CsrfTokenRef>
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for CsrfTokenRef
impl Display for CsrfTokenRef
Source§impl<'a, 'b: 'a> From<&'a Cow<'b, CsrfTokenRef>> for &'a CsrfTokenRef
impl<'a, 'b: 'a> From<&'a Cow<'b, CsrfTokenRef>> for &'a CsrfTokenRef
Source§fn from(r: &'a Cow<'b, CsrfTokenRef>) -> &'a CsrfTokenRef
fn from(r: &'a Cow<'b, CsrfTokenRef>) -> &'a CsrfTokenRef
Converts to this type from the input type.
Source§impl From<&CsrfTokenRef> for Arc<CsrfTokenRef>
impl From<&CsrfTokenRef> for Arc<CsrfTokenRef>
Source§fn from(r: &CsrfTokenRef) -> Self
fn from(r: &CsrfTokenRef) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a CsrfTokenRef> for Cow<'a, CsrfTokenRef>
impl<'a> From<&'a CsrfTokenRef> for Cow<'a, CsrfTokenRef>
Source§fn from(r: &'a CsrfTokenRef) -> Self
fn from(r: &'a CsrfTokenRef) -> Self
Converts to this type from the input type.
Source§impl From<&CsrfTokenRef> for CsrfToken
impl From<&CsrfTokenRef> for CsrfToken
Source§fn from(s: &CsrfTokenRef) -> Self
fn from(s: &CsrfTokenRef) -> Self
Converts to this type from the input type.
Source§impl From<&CsrfTokenRef> for Rc<CsrfTokenRef>
impl From<&CsrfTokenRef> for Rc<CsrfTokenRef>
Source§fn from(r: &CsrfTokenRef) -> Self
fn from(r: &CsrfTokenRef) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a str> for &'a CsrfTokenRef
impl<'a> From<&'a str> for &'a CsrfTokenRef
Source§fn from(s: &'a str) -> &'a CsrfTokenRef
fn from(s: &'a str) -> &'a CsrfTokenRef
Converts to this type from the input type.