pub struct BlockingClient { /* private fields */ }Expand description
Hardened provider-neutral reqwest blocking bearer transport.
Implementations§
Source§impl BlockingClient
impl BlockingClient
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 bearer token used by newly started requests.
In-flight requests retain their previous snapshot. The immutable scope cannot change during rotation.
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 BlockingAuthenticatedTransport for BlockingClient
impl BlockingAuthenticatedTransport for BlockingClient
Source§type Error = TransportError
type Error = TransportError
Transport-specific failure.
Source§fn send_authenticated(
&self,
request: AuthenticatedRequest<'_, '_>,
response: &mut ResponseWriter<'_>,
) -> Result<(), Self::Error>
fn send_authenticated( &self, request: AuthenticatedRequest<'_, '_>, response: &mut ResponseWriter<'_>, ) -> Result<(), Self::Error>
Validates scope and sends one authenticated request.
Source§impl BoundTransport for BlockingClient
impl BoundTransport for BlockingClient
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 BlockingClient
impl Clone for BlockingClient
Source§fn clone(&self) -> BlockingClient
fn clone(&self) -> BlockingClient
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 BlockingClient
impl Debug for BlockingClient
Source§impl ResponseStorageSanitizer for BlockingClient
impl ResponseStorageSanitizer for BlockingClient
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 BlockingClient
impl !UnwindSafe for BlockingClient
impl Freeze for BlockingClient
impl Send for BlockingClient
impl Sync for BlockingClient
impl Unpin for BlockingClient
impl UnsafeUnpin for BlockingClient
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