pub struct CsrfToken(/* private fields */);
Expand description
A Csrf Token
Implementations§
Source§impl CsrfToken
impl CsrfToken
Sourcepub fn from_static(raw: &'static str) -> Self
pub fn from_static(raw: &'static str) -> Self
Constructs a new CsrfToken from a static reference
Sourcepub fn into_boxed_ref(self) -> Box<CsrfTokenRef>
pub fn into_boxed_ref(self) -> Box<CsrfTokenRef>
Converts this CsrfToken
into a Box<CsrfTokenRef>
This will drop any excess capacity.
Source§impl CsrfToken
impl CsrfToken
Sourcepub fn new_random() -> CsrfToken
pub fn new_random() -> CsrfToken
Make a new random CSRF token.
Sourcepub fn new_random_len(len: u32) -> CsrfToken
pub fn new_random_len(len: u32) -> CsrfToken
Make a new random CSRF token with given amount of bytes
Methods from Deref<Target = CsrfTokenRef>§
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 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<'de> Deserialize<'de> for CsrfToken
impl<'de> Deserialize<'de> for CsrfToken
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 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<Box<CsrfTokenRef>> for CsrfToken
impl From<Box<CsrfTokenRef>> for CsrfToken
Source§fn from(r: Box<CsrfTokenRef>) -> Self
fn from(r: Box<CsrfTokenRef>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<Cow<'a, CsrfTokenRef>> for CsrfToken
impl<'a> From<Cow<'a, CsrfTokenRef>> for CsrfToken
Source§fn from(r: Cow<'a, CsrfTokenRef>) -> Self
fn from(r: Cow<'a, CsrfTokenRef>) -> Self
Converts to this type from the input type.
Source§impl Ord for CsrfToken
impl Ord for CsrfToken
Source§impl PartialEq<&CsrfTokenRef> for CsrfToken
impl PartialEq<&CsrfTokenRef> for CsrfToken
Source§impl PartialEq<CsrfToken> for &CsrfTokenRef
impl PartialEq<CsrfToken> for &CsrfTokenRef
Source§impl PartialEq<CsrfToken> for CsrfTokenRef
impl PartialEq<CsrfToken> for CsrfTokenRef
Source§impl PartialEq<CsrfTokenRef> for CsrfToken
impl PartialEq<CsrfTokenRef> for CsrfToken
Source§impl PartialOrd for CsrfToken
impl PartialOrd for CsrfToken
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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)