pub struct StaticBearer(/* private fields */);Expand description
A rotatable credential. Replacement is validated before it becomes visible; revocation is explicit and never turns an authenticated call anonymous.
Implementations§
Source§impl StaticBearer
impl StaticBearer
Sourcepub fn new(token: BearerToken) -> Arc<Self> ⓘ
pub fn new(token: BearerToken) -> Arc<Self> ⓘ
A provider that returns token until replaced or revoked.
Sourcepub fn replace(&self, token: BearerToken)
pub fn replace(&self, token: BearerToken)
Rotate to token; calls that ask for a credential afterward use it.
Trait Implementations§
Source§impl BearerProvider for StaticBearer
impl BearerProvider for StaticBearer
Source§fn token<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<BearerToken, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn token<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<BearerToken, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
The credential to send on the next control-plane call. Called once
per request, inside that request’s deadline. Read more
Auto Trait Implementations§
impl !Freeze for StaticBearer
impl RefUnwindSafe for StaticBearer
impl Send for StaticBearer
impl Sync for StaticBearer
impl Unpin for StaticBearer
impl UnsafeUnpin for StaticBearer
impl UnwindSafe for StaticBearer
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