[][src]Struct service_authenticator::AccessToken

pub struct AccessToken { /* fields omitted */ }

Represents an access token returned by oauth2 servers. All access tokens are Bearer tokens. Other types of tokens are not supported.

Implementations

impl AccessToken[src]

pub fn as_str(&self) -> &str[src]

A string representation of the access token.

pub fn expiration_time(&self) -> Option<DateTime<Utc>>[src]

The time the access token will expire, if any.

pub fn is_expired(&self) -> bool[src]

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

impl AsRef<str> for AccessToken[src]

impl Clone for AccessToken[src]

impl Debug for AccessToken[src]

impl<'de> Deserialize<'de> for AccessToken[src]

impl Eq for AccessToken[src]

impl Hash for AccessToken[src]

impl Ord for AccessToken[src]

impl PartialEq<AccessToken> for AccessToken[src]

impl PartialOrd<AccessToken> for AccessToken[src]

impl Serialize for AccessToken[src]

impl StructuralEq for AccessToken[src]

impl StructuralPartialEq for AccessToken[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,