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 + Sync + Send>>> + Send + 'a>>
fn get_token<'a>( &'a self, _scopes: &'a [&str], ) -> Pin<Box<dyn Future<Output = Result<Option<String>, Box<dyn Error + Sync + Send>>> + 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 Freeze for NoToken
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> GetTokenClone for T
impl<T> GetTokenClone for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more