#[non_exhaustive]pub enum Error {
KmsGetPublicKey {
profile: Option<String>,
key_id: String,
source: SdkError<GetPublicKeyError>,
backtrace: Backtrace,
},
PublicKeyNone,
PublicKeyParse {
source: Error,
},
KmsSignMessage {
key_id: String,
profile: Option<String>,
source: SdkError<SignError>,
backtrace: Backtrace,
},
SignatureNotFound,
ValidSignAlgorithm,
MissingSignAlgorithm,
MissingKeySpec,
BadKeySpec {
spec: String,
},
BadKeySpecInt {
spec: String,
source: ParseIntError,
},
SignatureTooLong {
modulus_size_bytes: usize,
signature_size_bytes: usize,
},
UnsupportedModulusSize {
modulus_size_bits: usize,
spec: String,
},
}
Expand description
The error type for this library.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
KmsGetPublicKey
Fields
§
source: SdkError<GetPublicKeyError>
The library failed to get public key from AWS KMS
PublicKeyNone
Empty public key was returned by AWS KMS
PublicKeyParse
Public key could not be parsed as an SPKI document
KmsSignMessage
The library failed to get the message signature from AWS KMS
SignatureNotFound
Empty signature was returned by AWS KMS
ValidSignAlgorithm
Provided signing algorithm is not valid
MissingSignAlgorithm
Supported signing algorithm list is missing for CMK in AWS KMS
MissingKeySpec
BadKeySpec
BadKeySpecInt
SignatureTooLong
UnsupportedModulusSize
Trait Implementations§
source§impl Error for Error
impl Error for Error
source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§impl ErrorCompat for Error
impl ErrorCompat for Error
source§fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
Returns an iterator for traversing the chain of errors,
starting with the current error
and continuing with recursive calls to
Error::source
. Read moreAuto Trait Implementations§
impl !Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations§
source§impl<T> AsErrorSource for Twhere
T: Error + 'static,
impl<T> AsErrorSource for Twhere
T: Error + 'static,
source§fn as_error_source(&self) -> &(dyn Error + 'static)
fn as_error_source(&self) -> &(dyn Error + 'static)
For maximum effectiveness, this needs to be called as a method
to benefit from Rust’s automatic dereferencing of method
receivers.
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Creates a shared type from an unshared type.