pub struct AsyncClient { /* private fields */ }Expand description
Hardened provider-neutral reqwest asynchronous 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 rotate_bearer_token(
&self,
replacement: BearerToken,
) -> Result<(), CredentialStateError>
pub fn rotate_bearer_token( &self, replacement: BearerToken, ) -> Result<(), CredentialStateError>
Atomically replaces the bearer token used by newly started requests.
In-flight requests retain their previous snapshot. No credential lock
is held across network I/O or .await.
Sourcepub fn rotate_bearer_token_from_mut_bytes(
&self,
source: &mut [u8],
) -> Result<(), TokenRotationError>
pub fn rotate_bearer_token_from_mut_bytes( &self, source: &mut [u8], ) -> Result<(), TokenRotationError>
Validates and rotates from mutable bytes, clearing the complete source on success or failure. Rejected input leaves the active token unchanged.
Sourcepub fn rotate_bearer_token_from_secret_buffer(
&self,
source: SecretBuffer<'_>,
) -> Result<(), TokenRotationError>
pub fn rotate_bearer_token_from_secret_buffer( &self, source: SecretBuffer<'_>, ) -> Result<(), TokenRotationError>
Validates and rotates from guarded storage. Dropping the consumed guard clears the complete source on success or failure.
Trait Implementations§
Source§impl AsyncTransport for AsyncClient
impl AsyncTransport for AsyncClient
Source§type Error = TransportError
type Error = TransportError
Transport-specific failure.
Source§async fn send<'transport, 'request, 'buffer>(
&'transport self,
request: TransportRequest<'request>,
response_body: &'buffer mut [u8],
) -> Result<TransportResponse<'buffer>, Self::Error>where
'request: 'transport,
'buffer: 'transport,
async fn send<'transport, 'request, 'buffer>(
&'transport self,
request: TransportRequest<'request>,
response_body: &'buffer mut [u8],
) -> Result<TransportResponse<'buffer>, Self::Error>where
'request: 'transport,
'buffer: 'transport,
Sends one request and initializes the complete response body in the
caller buffer.
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 moreAuto 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