#[non_exhaustive]pub struct AuthTokens {
pub session: String,
pub refresh: String,
}Expand description
JWT that must be included with requests that require Bearer authentication.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.session: StringToken that lives for 15 minutes.
refresh: StringToken that lives for 1 month; allows for refreshing without re-authenticating.
Trait Implementations§
Source§impl Clone for AuthTokens
impl Clone for AuthTokens
Source§fn clone(&self) -> AuthTokens
fn clone(&self) -> AuthTokens
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 AuthTokens
impl Debug for AuthTokens
Source§impl Default for AuthTokens
impl Default for AuthTokens
Source§fn default() -> AuthTokens
fn default() -> AuthTokens
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for AuthTokens
impl<'de> Deserialize<'de> for AuthTokens
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<OAuthTokenResponse> for AuthTokens
impl From<OAuthTokenResponse> for AuthTokens
Source§fn from(value: OAuthTokenResponse) -> Self
fn from(value: OAuthTokenResponse) -> Self
Converts to this type from the input type.
Source§impl PartialEq for AuthTokens
impl PartialEq for AuthTokens
impl StructuralPartialEq for AuthTokens
Auto Trait Implementations§
impl Freeze for AuthTokens
impl RefUnwindSafe for AuthTokens
impl Send for AuthTokens
impl Sync for AuthTokens
impl Unpin for AuthTokens
impl UnwindSafe for AuthTokens
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