Struct google_apis_common::auth::NoToken
source · pub struct NoToken;
Expand description
In the event that the API endpoint does not require an oauth2 token, NoToken
should be provided to the hub to avoid specifying an
authenticator.
Trait Implementations§
source§impl GetToken for NoToken
impl GetToken for NoToken
source§fn get_token<'a>(
&'a self,
_scopes: &'a [&str]
) -> Pin<Box<dyn Future<Output = Result<Option<String>, Box<dyn Error + Send + Sync>>> + Send + 'a>>
fn get_token<'a>( &'a self, _scopes: &'a [&str] ) -> Pin<Box<dyn Future<Output = Result<Option<String>, Box<dyn Error + Send + Sync>>> + Send + 'a>>
Called whenever an API call requires authentication via an oauth2 token.
Returns
Ok(None)
if a token is not necessary - otherwise, returns an error
indicating the reason why a token could not be produced.Auto Trait Implementations§
impl RefUnwindSafe for NoToken
impl Send for NoToken
impl Sync for NoToken
impl Unpin for NoToken
impl UnwindSafe for NoToken
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