Struct cloud_storage_lite::token_provider::oauth::ServiceAccount[][src]

pub struct ServiceAccount { /* fields omitted */ }

A representation of a GCP service account file. Contains the information required to obtain an access token via OAuth.

Implementations

impl ServiceAccount[src]

pub fn read_from_file(
    path: impl AsRef<Path>
) -> Result<Self, ServiceAccountError>
[src]

Reads the service account JSON file at path and attempts to parse it.

pub fn read_from_canonical_env() -> Result<Self, ServiceAccountError>[src]

Reads the ServiceAccount from the file pointed to by the GOOGLE_APPLICATION_CREDENTIALS environment variable.

Trait Implementations

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

impl FromStr for ServiceAccount[src]

type Err = ServiceAccountError

The associated error which can be returned from parsing.

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<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, 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.