pub struct BearerCredentialScope { /* private fields */ }Expand description
Immutable owned scope attached to one bearer-credential lifecycle.
Rotation and refresh replace only the token. They cannot change this scope.
Implementations§
Source§impl BearerCredentialScope
impl BearerCredentialScope
Sourcepub const fn new(
provider: ProviderId,
service: ServiceId,
endpoint: HttpsEndpoint,
) -> Self
pub const fn new( provider: ProviderId, service: ServiceId, endpoint: HttpsEndpoint, ) -> Self
Binds a credential to one provider, service, and transport endpoint.
Sourcepub fn try_with_audience(
self,
value: &str,
) -> Result<Self, BearerCredentialScopeError>
pub fn try_with_audience( self, value: &str, ) -> Result<Self, BearerCredentialScopeError>
Binds a provider-owned audience.
Sourcepub fn try_with_account(
self,
value: &str,
) -> Result<Self, BearerCredentialScopeError>
pub fn try_with_account( self, value: &str, ) -> Result<Self, BearerCredentialScopeError>
Binds a provider-owned account.
Sourcepub fn try_with_tenant(
self,
value: &str,
) -> Result<Self, BearerCredentialScopeError>
pub fn try_with_tenant( self, value: &str, ) -> Result<Self, BearerCredentialScopeError>
Binds a provider-owned tenant.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BearerCredentialScope
impl RefUnwindSafe for BearerCredentialScope
impl Send for BearerCredentialScope
impl Sync for BearerCredentialScope
impl Unpin for BearerCredentialScope
impl UnsafeUnpin for BearerCredentialScope
impl UnwindSafe for BearerCredentialScope
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