pub struct StaticTokenSource { /* private fields */ }Expand description
A static token source that always returns the same token.
Can be created from a String or &'static str.
Trait Implementations§
Source§impl From<&'static str> for StaticTokenSource
impl From<&'static str> for StaticTokenSource
Source§fn from(token: &'static str) -> StaticTokenSource
fn from(token: &'static str) -> StaticTokenSource
Converts to this type from the input type.
Source§impl From<String> for StaticTokenSource
impl From<String> for StaticTokenSource
Source§fn from(token: String) -> StaticTokenSource
fn from(token: String) -> StaticTokenSource
Converts to this type from the input type.
Source§impl TokenSource for StaticTokenSource
impl TokenSource for StaticTokenSource
Source§fn get_token<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, TokenSourceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
StaticTokenSource: 'async_trait,
fn get_token<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, TokenSourceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
StaticTokenSource: 'async_trait,
Gets a token, possibly refreshing it. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for StaticTokenSource
impl !UnwindSafe for StaticTokenSource
impl Freeze for StaticTokenSource
impl Send for StaticTokenSource
impl Sync for StaticTokenSource
impl Unpin for StaticTokenSource
impl UnsafeUnpin for StaticTokenSource
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request