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_with_lifetime(
&self,
replacement: BearerToken,
lifetime: CredentialLifetime,
) -> Result<CredentialGeneration, CredentialUpdateError>
pub fn rotate_bearer_token_with_lifetime( &self, replacement: BearerToken, lifetime: CredentialLifetime, ) -> Result<CredentialGeneration, CredentialUpdateError>
Atomically replaces an expiring token and its complete lifetime.
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 rotate_bearer_token_from_mut_bytes_with_lifetime(
&self,
source: &mut [u8],
lifetime: CredentialLifetime,
) -> Result<CredentialGeneration, TokenRotationError>
pub fn rotate_bearer_token_from_mut_bytes_with_lifetime( &self, source: &mut [u8], lifetime: CredentialLifetime, ) -> Result<CredentialGeneration, TokenRotationError>
Clears mutable input and atomically installs an expiring replacement.
Sourcepub fn rotate_bearer_token_from_secret_buffer_with_lifetime(
&self,
source: SecretBuffer<'_>,
lifetime: CredentialLifetime,
) -> Result<CredentialGeneration, TokenRotationError>
pub fn rotate_bearer_token_from_secret_buffer_with_lifetime( &self, source: SecretBuffer<'_>, lifetime: CredentialLifetime, ) -> Result<CredentialGeneration, TokenRotationError>
Consumes guarded input and atomically installs an expiring replacement.
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_with_lifetime(
&self,
handoff: BearerRefreshHandoff,
replacement: BearerToken,
lifetime: CredentialLifetime,
) -> Result<CredentialGeneration, TokenRefreshError>
pub fn refresh_bearer_token_with_lifetime( &self, handoff: BearerRefreshHandoff, replacement: BearerToken, lifetime: CredentialLifetime, ) -> Result<CredentialGeneration, TokenRefreshError>
Installs an expiring refresh if its time-qualified handoff is 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.
Sourcepub fn refresh_bearer_token_from_mut_bytes_with_lifetime(
&self,
handoff: BearerRefreshHandoff,
source: &mut [u8],
lifetime: CredentialLifetime,
) -> Result<CredentialGeneration, TokenRefreshError>
pub fn refresh_bearer_token_from_mut_bytes_with_lifetime( &self, handoff: BearerRefreshHandoff, source: &mut [u8], lifetime: CredentialLifetime, ) -> Result<CredentialGeneration, TokenRefreshError>
Clears mutable refresh input and atomically installs its lifetime.
Sourcepub fn refresh_bearer_token_from_secret_buffer_with_lifetime(
&self,
handoff: BearerRefreshHandoff,
source: SecretBuffer<'_>,
lifetime: CredentialLifetime,
) -> Result<CredentialGeneration, TokenRefreshError>
pub fn refresh_bearer_token_from_secret_buffer_with_lifetime( &self, handoff: BearerRefreshHandoff, source: SecretBuffer<'_>, lifetime: CredentialLifetime, ) -> Result<CredentialGeneration, TokenRefreshError>
Consumes guarded refresh input and atomically installs its lifetime.
Trait Implementations§
Source§impl AsyncAuthenticatedTransport for AsyncClient
impl AsyncAuthenticatedTransport for AsyncClient
Source§type Error = TransportFailure<TransportError>
type Error = TransportFailure<TransportError>
Source§async fn send_authenticated<'transport, 'request, 'policy, 'writer, 'buffer>(
&'transport self,
request: AuthenticatedRequest<'request, 'policy>,
response: AsyncResponseStaging<'writer, 'buffer>,
) -> Result<ResponseCompletion, Self::Error>where
'transport: 'writer,
'request: 'writer,
'policy: 'writer,
'buffer: 'writer,
async fn send_authenticated<'transport, 'request, 'policy, 'writer, 'buffer>(
&'transport self,
request: AuthenticatedRequest<'request, 'policy>,
response: AsyncResponseStaging<'writer, 'buffer>,
) -> Result<ResponseCompletion, Self::Error>where
'transport: 'writer,
'request: 'writer,
'policy: 'writer,
'buffer: 'writer,
Source§impl BoundTransport for AsyncClient
impl BoundTransport for AsyncClient
Source§fn endpoint_identity(
&self,
) -> Result<EndpointIdentity<'_>, EndpointIdentityError>
fn endpoint_identity( &self, ) -> Result<EndpointIdentity<'_>, EndpointIdentityError>
Source§impl Clone for AsyncClient
impl Clone for AsyncClient
Source§fn clone(&self) -> AsyncClient
fn clone(&self) -> AsyncClient
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more