#[non_exhaustive]pub enum ProviderError {
Unsupported {
operation: ProviderOperation,
algorithm: Option<String>,
},
InvalidKeySize {
expected: usize,
actual: usize,
},
InvalidOutputSize {
operation: ProviderOperation,
expected: usize,
actual: usize,
},
InvalidOutputSizeRange {
operation: ProviderOperation,
minimum: usize,
maximum: usize,
actual: usize,
},
InvalidInput(ProviderInputError),
AuthenticationFailed,
Random(String),
}Expand description
Failure returned by a cryptographic provider.
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.
Unsupported
The selected provider does not implement the operation/parameters.
Fields
§
operation: ProviderOperationRequested operation.
InvalidKeySize
A key has the wrong size for the selected algorithm.
InvalidOutputSize
A provider reported success but returned bytes that violate the selected operation’s fixed-size output contract.
Fields
§
operation: ProviderOperationOperation whose output contract was violated.
InvalidOutputSizeRange
A provider reported success but returned bytes outside the selected operation’s variable-size output contract.
Fields
§
operation: ProviderOperationOperation whose output contract was violated.
InvalidInput(ProviderInputError)
Input framing, padding, or primitive initialization is invalid.
AuthenticationFailed
Authenticated decryption or key-wrap integrity validation failed.
Random(String)
Operating-system randomness was unavailable.
Trait Implementations§
Source§impl Clone for ProviderError
impl Clone for ProviderError
Source§fn clone(&self) -> ProviderError
fn clone(&self) -> ProviderError
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 ProviderError
impl Debug for ProviderError
Source§impl Display for ProviderError
impl Display for ProviderError
impl Eq for ProviderError
Source§impl Error for ProviderError
impl Error for ProviderError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<ProviderError> for ParseError
impl From<ProviderError> for ParseError
Source§fn from(source: ProviderError) -> Self
fn from(source: ProviderError) -> Self
Converts to this type from the input type.
Source§impl From<ProviderError> for SigningDigestError
impl From<ProviderError> for SigningDigestError
Source§fn from(source: ProviderError) -> Self
fn from(source: ProviderError) -> Self
Converts to this type from the input type.
Source§impl From<ProviderError> for SigningKeyError
impl From<ProviderError> for SigningKeyError
Source§fn from(source: ProviderError) -> Self
fn from(source: ProviderError) -> Self
Converts to this type from the input type.
Source§impl From<ProviderError> for ReferenceProcessingError
impl From<ProviderError> for ReferenceProcessingError
Source§fn from(source: ProviderError) -> Self
fn from(source: ProviderError) -> Self
Converts to this type from the input type.
Source§impl From<ProviderError> for DsigError
impl From<ProviderError> for DsigError
Source§fn from(source: ProviderError) -> Self
fn from(source: ProviderError) -> Self
Converts to this type from the input type.
Source§impl From<ProviderError> for X509ChainError
impl From<ProviderError> for X509ChainError
Source§fn from(source: ProviderError) -> Self
fn from(source: ProviderError) -> Self
Converts to this type from the input type.
Source§impl From<ProviderError> for XmlEncError
impl From<ProviderError> for XmlEncError
Source§fn from(source: ProviderError) -> Self
fn from(source: ProviderError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ProviderError
impl PartialEq for ProviderError
impl StructuralPartialEq for ProviderError
Auto Trait Implementations§
impl Freeze for ProviderError
impl RefUnwindSafe for ProviderError
impl Send for ProviderError
impl Sync for ProviderError
impl Unpin for ProviderError
impl UnsafeUnpin for ProviderError
impl UnwindSafe for ProviderError
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<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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