pub trait AsyncSigner<S> {
// Required method
async fn sign_async(&self, msg: &[u8]) -> Result<S, Error>;
}Expand description
Asynchronously sign the provided message bytestring using Self (e.g. client for a Cloud KMS or
HSM), returning a digital signature.
This trait is an async equivalent of the Signer trait.
Required Methods§
Sourceasync fn sign_async(&self, msg: &[u8]) -> Result<S, Error>
async fn sign_async(&self, msg: &[u8]) -> Result<S, Error>
Attempt to sign the given message, returning a digital signature on success, or an error if something went wrong.
The main intended use case for signing errors is when communicating with external signers, e.g. cloud KMS, HSMs, or other hardware tokens.
§Errors
Returns implementation-specific errors in the event signing failed (e.g. KMS or HSM communication error).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.