Struct yup_oauth2::AccessToken 
source · pub struct AccessToken { /* private fields */ }Expand description
Represents a token returned by oauth2 servers. All tokens are Bearer tokens. Other types of tokens are not supported.
Implementations§
source§impl AccessToken
 
impl AccessToken
sourcepub fn expiration_time(&self) -> Option<OffsetDateTime>
 
pub fn expiration_time(&self) -> Option<OffsetDateTime>
The time at which the tokens will expire, if any.
sourcepub fn is_expired(&self) -> bool
 
pub fn is_expired(&self) -> bool
Determine if the access token is expired.
This will report that the token is expired 1 minute prior to the expiration time to ensure that when the token is actually sent to the server it’s still valid.
Trait Implementations§
source§impl Clone for AccessToken
 
impl Clone for AccessToken
source§fn clone(&self) -> AccessToken
 
fn clone(&self) -> AccessToken
Returns a copy 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 AccessToken
 
impl Debug for AccessToken
source§impl<'de> Deserialize<'de> for AccessToken
 
impl<'de> Deserialize<'de> for AccessToken
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<TokenInfo> for AccessToken
 
impl From<TokenInfo> for AccessToken
source§impl Hash for AccessToken
 
impl Hash for AccessToken
source§impl Ord for AccessToken
 
impl Ord for AccessToken
source§fn cmp(&self, other: &AccessToken) -> Ordering
 
fn cmp(&self, other: &AccessToken) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
    Self: Sized,
 
fn max(self, other: Self) -> Selfwhere
    Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for AccessToken
 
impl PartialEq for AccessToken
source§fn eq(&self, other: &AccessToken) -> bool
 
fn eq(&self, other: &AccessToken) -> bool
This method tests for 
self and other values to be equal, and is used
by ==.source§impl PartialOrd for AccessToken
 
impl PartialOrd for AccessToken
source§fn partial_cmp(&self, other: &AccessToken) -> Option<Ordering>
 
fn partial_cmp(&self, other: &AccessToken) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
 
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for 
self and other) and is used by the <=
operator. Read moresource§impl Serialize for AccessToken
 
impl Serialize for AccessToken
impl Eq for AccessToken
impl StructuralEq for AccessToken
impl StructuralPartialEq for AccessToken
Auto Trait Implementations§
impl RefUnwindSafe for AccessToken
impl Send for AccessToken
impl Sync for AccessToken
impl Unpin for AccessToken
impl UnwindSafe for AccessToken
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<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
Compare self to 
key and return true if they are equal.