#[non_exhaustive]pub enum PrimitiveErrorReason {
MissingAlgorithm,
MissingOperation,
InvalidKey,
InvalidPublicKey,
InvalidPrivateKey,
MalformedCiphertext,
InvalidParameter,
InvalidLength,
LengthOverflow,
VerificationFailed,
InvalidSharedSecret,
ResourceLimitExceeded,
}Expand description
Primitive-origin failure reasons.
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.
MissingAlgorithm
A required algorithm selector was absent.
MissingOperation
A required operation selector was absent.
InvalidKey
Key material failed length or mathematical validity checks.
InvalidPublicKey
A public key failed length, encoding, or mathematical validity checks.
InvalidPrivateKey
A private key failed length, encoding, or mathematical validity checks.
MalformedCiphertext
A ciphertext or encapsulated key failed structural validation.
InvalidParameter
A typed operation parameter violated its protocol contract.
InvalidLength
Nonce, IV, salt, tag, signature, or ciphertext length was invalid.
LengthOverflow
A checked buffer length, offset, or capacity calculation overflowed.
VerificationFailed
Authentication, MAC, signature, or constant-time equality failed.
A raw key-agreement output failed contributory or shape validation.
ResourceLimitExceeded
A primitive resource limit was exceeded.
Trait Implementations§
Source§impl Clone for PrimitiveErrorReason
impl Clone for PrimitiveErrorReason
Source§fn clone(&self) -> PrimitiveErrorReason
fn clone(&self) -> PrimitiveErrorReason
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 moreimpl Copy for PrimitiveErrorReason
Source§impl Debug for PrimitiveErrorReason
impl Debug for PrimitiveErrorReason
Source§impl Display for PrimitiveErrorReason
impl Display for PrimitiveErrorReason
impl Eq for PrimitiveErrorReason
Source§impl PartialEq for PrimitiveErrorReason
impl PartialEq for PrimitiveErrorReason
impl StructuralPartialEq for PrimitiveErrorReason
Auto Trait Implementations§
impl Freeze for PrimitiveErrorReason
impl RefUnwindSafe for PrimitiveErrorReason
impl Send for PrimitiveErrorReason
impl Sync for PrimitiveErrorReason
impl Unpin for PrimitiveErrorReason
impl UnsafeUnpin for PrimitiveErrorReason
impl UnwindSafe for PrimitiveErrorReason
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