pub trait Signer: Send + Sync {
// Required methods
fn sign<'life0, 'life1, 'async_trait>(
&'life0 self,
shaped: ShapedRequest,
capability: &'life1 mut SigningCapability,
) -> Pin<Box<dyn Future<Output = Result<SignedRequest, SignerError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn on_unauthorized<'life0, 'life1, 'async_trait>(
&'life0 self,
err: &'life1 UpstreamError,
) -> Pin<Box<dyn Future<Output = RetryDecision> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Signer boundary for applying credentials to shaped requests.
Required Methods§
Sourcefn sign<'life0, 'life1, 'async_trait>(
&'life0 self,
shaped: ShapedRequest,
capability: &'life1 mut SigningCapability,
) -> Pin<Box<dyn Future<Output = Result<SignedRequest, SignerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn sign<'life0, 'life1, 'async_trait>(
&'life0 self,
shaped: ShapedRequest,
capability: &'life1 mut SigningCapability,
) -> Pin<Box<dyn Future<Output = Result<SignedRequest, SignerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Consumes a shaped request and returns a sealed signed request.
Handles an unauthorized upstream response, optionally refreshing credentials.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".