pub struct GoogleClient {
pub client_credentials: ClientCredentials,
pub access_token: Option<ClientTokenData>,
pub req_client: Client,
pub auto_refresh_token: bool,
/* private fields */
}Fields§
§client_credentials: ClientCredentials§access_token: Option<ClientTokenData>§req_client: Client§auto_refresh_token: boolImplementations§
Source§impl GoogleClient
impl GoogleClient
pub fn new( client_credentials: ClientCredentials, access_token: AccessToken, auto_refresh_token: bool, ) -> Self
pub fn add_token_refresh_handler<H>(&mut self, handler: H)where
H: TokenRefreshHandler + 'static,
pub async fn refresh_access_token_check(&mut self) -> Result<(), Error>
pub fn enable_auto_refresh(&mut self)
pub fn disable_auto_refresh(&mut self)
pub fn is_access_token_valid(&self) -> bool
pub async fn update_access_token(&mut self) -> Result<(), Error>
Trait Implementations§
Source§impl Clone for GoogleClient
impl Clone for GoogleClient
Source§fn clone(&self) -> GoogleClient
fn clone(&self) -> GoogleClient
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 GoogleClient
impl Debug for GoogleClient
Source§impl Default for GoogleClient
impl Default for GoogleClient
Source§fn default() -> GoogleClient
fn default() -> GoogleClient
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for GoogleClient
impl !UnwindSafe for GoogleClient
impl Freeze for GoogleClient
impl Send for GoogleClient
impl Sync for GoogleClient
impl Unpin for GoogleClient
impl UnsafeUnpin for GoogleClient
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