pub struct AsyncClient { /* private fields */ }Expand description
Hardened provider-neutral reqwest asynchronous bearer transport.
The adapter uses reqwest’s Tokio-based execution internally but does not install or own a runtime. Callers must poll it from a compatible executor.
Implementations§
Source§impl AsyncClient
impl AsyncClient
Sourcepub fn credential_snapshot(
&self,
) -> Result<BearerCredentialSnapshot, CredentialStateError>
pub fn credential_snapshot( &self, ) -> Result<BearerCredentialSnapshot, CredentialStateError>
Captures the current generation without exposing token bytes.
Sourcepub fn rotate_bearer_token(
&self,
replacement: BearerToken,
) -> Result<CredentialGeneration, CredentialUpdateError>
pub fn rotate_bearer_token( &self, replacement: BearerToken, ) -> Result<CredentialGeneration, CredentialUpdateError>
Atomically replaces the token while retaining immutable scope.
Sourcepub fn rotate_bearer_token_from_mut_bytes(
&self,
source: &mut [u8],
) -> Result<CredentialGeneration, TokenRotationError>
pub fn rotate_bearer_token_from_mut_bytes( &self, source: &mut [u8], ) -> Result<CredentialGeneration, TokenRotationError>
Validates and rotates mutable bytes, clearing the complete source.
Sourcepub fn rotate_bearer_token_from_secret_buffer(
&self,
source: SecretBuffer<'_>,
) -> Result<CredentialGeneration, TokenRotationError>
pub fn rotate_bearer_token_from_secret_buffer( &self, source: SecretBuffer<'_>, ) -> Result<CredentialGeneration, TokenRotationError>
Validates and rotates guarded storage, which clears on return.
Sourcepub fn refresh_bearer_token(
&self,
handoff: BearerRefreshHandoff,
replacement: BearerToken,
) -> Result<CredentialGeneration, TokenRefreshError>
pub fn refresh_bearer_token( &self, handoff: BearerRefreshHandoff, replacement: BearerToken, ) -> Result<CredentialGeneration, TokenRefreshError>
Installs a refresh only if its captured generation is still current.
Sourcepub fn refresh_bearer_token_from_mut_bytes(
&self,
handoff: BearerRefreshHandoff,
source: &mut [u8],
) -> Result<CredentialGeneration, TokenRefreshError>
pub fn refresh_bearer_token_from_mut_bytes( &self, handoff: BearerRefreshHandoff, source: &mut [u8], ) -> Result<CredentialGeneration, TokenRefreshError>
Validates refreshed mutable bytes, clears them, and rejects stale work.
Sourcepub fn refresh_bearer_token_from_secret_buffer(
&self,
handoff: BearerRefreshHandoff,
source: SecretBuffer<'_>,
) -> Result<CredentialGeneration, TokenRefreshError>
pub fn refresh_bearer_token_from_secret_buffer( &self, handoff: BearerRefreshHandoff, source: SecretBuffer<'_>, ) -> Result<CredentialGeneration, TokenRefreshError>
Consumes guarded refreshed storage and rejects stale work.
Trait Implementations§
Source§impl AsyncAuthenticatedTransport for AsyncClient
impl AsyncAuthenticatedTransport for AsyncClient
Source§type Error = TransportError
type Error = TransportError
Transport-specific failure.
Source§async fn send_authenticated<'transport, 'request, 'policy, 'writer>(
&'transport self,
request: AuthenticatedRequest<'request, 'policy>,
response: &'writer mut ResponseWriter<'_>,
) -> Result<(), Self::Error>where
'transport: 'writer,
'request: 'writer,
'policy: 'writer,
async fn send_authenticated<'transport, 'request, 'policy, 'writer>(
&'transport self,
request: AuthenticatedRequest<'request, 'policy>,
response: &'writer mut ResponseWriter<'_>,
) -> Result<(), Self::Error>where
'transport: 'writer,
'request: 'writer,
'policy: 'writer,
Validates scope and sends one authenticated request.
Source§impl BoundTransport for AsyncClient
impl BoundTransport for AsyncClient
Source§fn endpoint_identity(
&self,
) -> Result<EndpointIdentity<'_>, EndpointIdentityError>
fn endpoint_identity( &self, ) -> Result<EndpointIdentity<'_>, EndpointIdentityError>
Returns the immutable normalized endpoint identity.
Source§impl Clone for AsyncClient
impl Clone for AsyncClient
Source§fn clone(&self) -> AsyncClient
fn clone(&self) -> AsyncClient
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AsyncClient
impl Debug for AsyncClient
Source§impl ResponseStorageSanitizer for AsyncClient
impl ResponseStorageSanitizer for AsyncClient
Source§fn sanitize_response_storage(&self, response_storage: &mut [u8])
fn sanitize_response_storage(&self, response_storage: &mut [u8])
Applies an additive platform-specific cleanup operation.
Auto Trait Implementations§
impl !RefUnwindSafe for AsyncClient
impl !UnwindSafe for AsyncClient
impl Freeze for AsyncClient
impl Send for AsyncClient
impl Sync for AsyncClient
impl Unpin for AsyncClient
impl UnsafeUnpin for AsyncClient
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