[][src]Struct yup_oauth2::ServiceAccountAccess

pub struct ServiceAccountAccess<C> { /* fields omitted */ }

A token source (GetToken) yielding OAuth tokens for services that use ServiceAccount authorization. This token source caches token and automatically renews expired ones, meaning you do not need (and you also should not) use this with Authenticator. Just use it directly.

Methods

impl ServiceAccountAccess<DefaultHyperClient>[src]

pub fn new(key: ServiceAccountKey) -> Self[src]

Create a new ServiceAccountAccess with the provided key.

impl<C> ServiceAccountAccess<C> where
    C: HyperClientBuilder,
    C::Connector: 'static, 
[src]

pub fn hyper_client<NewC: HyperClientBuilder>(
    self,
    hyper_client: NewC
) -> ServiceAccountAccess<NewC>
[src]

Use the provided hyper client.

pub fn sub(self, sub: String) -> Self[src]

Use the provided sub.

pub fn build(self) -> impl GetToken[src]

Build the configured ServiceAccountAccess.

Trait Implementations

impl<C: Clone> Clone for ServiceAccountAccess<C>[src]

Auto Trait Implementations

impl<C> Send for ServiceAccountAccess<C> where
    C: Send

impl<C> Unpin for ServiceAccountAccess<C> where
    C: Unpin

impl<C> Sync for ServiceAccountAccess<C> where
    C: Sync

impl<C> UnwindSafe for ServiceAccountAccess<C> where
    C: UnwindSafe

impl<C> RefUnwindSafe for ServiceAccountAccess<C> where
    C: RefUnwindSafe

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

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

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<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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

impl<T> Erased for T