pub struct ServiceAccount { /* private fields */ }Expand description
A representation of a GCP service account file. Contains the information required to obtain an access token via OAuth.
Implementations§
Source§impl ServiceAccount
impl ServiceAccount
Sourcepub fn read_from_file(
path: impl AsRef<Path>,
) -> Result<Self, ServiceAccountError>
pub fn read_from_file( path: impl AsRef<Path>, ) -> Result<Self, ServiceAccountError>
Reads the service account JSON file at path and attempts to parse it.
Sourcepub fn read_from_canonical_env() -> Result<Self, ServiceAccountError>
pub fn read_from_canonical_env() -> Result<Self, ServiceAccountError>
Reads the ServiceAccount from the file pointed to by the
GOOGLE_APPLICATION_CREDENTIALS environment variable.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ServiceAccount
impl<'de> Deserialize<'de> for ServiceAccount
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ServiceAccount
impl RefUnwindSafe for ServiceAccount
impl Send for ServiceAccount
impl Sync for ServiceAccount
impl Unpin for ServiceAccount
impl UnsafeUnpin for ServiceAccount
impl UnwindSafe for ServiceAccount
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