Struct twitch_oauth2::types::CsrfToken
source · [−]#[repr(transparent)]pub struct CsrfToken(_);
Expand description
A Csrf Token
Implementations
sourceimpl CsrfToken
impl CsrfToken
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.
sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Unwraps the underlying String
value
sourceimpl 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>
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
sourceimpl AsRef<CsrfTokenRef> for CsrfToken
impl AsRef<CsrfTokenRef> for CsrfToken
sourcefn as_ref(&self) -> &CsrfTokenRef
fn as_ref(&self) -> &CsrfTokenRef
Converts this type into a shared reference of the (usually inferred) input type.
sourceimpl Borrow<CsrfTokenRef> for CsrfToken
impl Borrow<CsrfTokenRef> for CsrfToken
sourcefn borrow(&self) -> &CsrfTokenRef
fn borrow(&self) -> &CsrfTokenRef
Immutably borrows from an owned value. Read more
sourceimpl Deref for CsrfToken
impl Deref for CsrfToken
type Target = CsrfTokenRef
type Target = CsrfTokenRef
The resulting type after dereferencing.
sourceimpl<'de> Deserialize<'de> for CsrfToken
impl<'de> Deserialize<'de> for CsrfToken
sourcefn 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
sourceimpl From<&'_ CsrfTokenRef> for CsrfToken
impl From<&'_ CsrfTokenRef> for CsrfToken
sourcefn from(s: &CsrfTokenRef) -> Self
fn from(s: &CsrfTokenRef) -> Self
Converts to this type from the input type.
sourceimpl From<Box<CsrfTokenRef, Global>> for CsrfToken
impl From<Box<CsrfTokenRef, Global>> for CsrfToken
sourcefn from(r: Box<CsrfTokenRef>) -> Self
fn from(r: Box<CsrfTokenRef>) -> Self
Converts to this type from the input type.
sourceimpl<'a> From<Cow<'a, CsrfTokenRef>> for CsrfToken
impl<'a> From<Cow<'a, CsrfTokenRef>> for CsrfToken
sourcefn from(r: Cow<'a, CsrfTokenRef>) -> Self
fn from(r: Cow<'a, CsrfTokenRef>) -> Self
Converts to this type from the input type.
sourceimpl From<CsrfToken> for Box<CsrfTokenRef>
impl From<CsrfToken> for Box<CsrfTokenRef>
sourceimpl<'a> From<CsrfToken> for Cow<'a, CsrfTokenRef>
impl<'a> From<CsrfToken> for Cow<'a, CsrfTokenRef>
sourceimpl PartialEq<&'_ CsrfTokenRef> for CsrfToken
impl PartialEq<&'_ CsrfTokenRef> for CsrfToken
sourceimpl PartialEq<CsrfToken> for CsrfTokenRef
impl PartialEq<CsrfToken> for CsrfTokenRef
sourceimpl PartialEq<CsrfToken> for &CsrfTokenRef
impl PartialEq<CsrfToken> for &CsrfTokenRef
sourceimpl PartialEq<CsrfToken> for Box<CsrfTokenRef>
impl PartialEq<CsrfToken> for Box<CsrfTokenRef>
sourceimpl PartialEq<CsrfTokenRef> for CsrfToken
impl PartialEq<CsrfTokenRef> for CsrfToken
impl Eq for CsrfToken
Auto Trait Implementations
impl RefUnwindSafe for CsrfToken
impl Send for CsrfToken
impl Sync for CsrfToken
impl Unpin for CsrfToken
impl UnwindSafe for CsrfToken
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more