#[non_exhaustive]pub enum PrivacyError {
Show 13 variants
InvalidKeyLength,
InvalidKeyEncoding(&'static str),
InvalidKeyId,
InvalidEnvelope,
UnsupportedEnvelopeVersion(String),
KeyNotFound(String),
RandomnessUnavailable,
EncryptionFailed(String),
DecryptionFailed(String),
PayloadTooShort,
Base64Error(String),
Utf8Error(String),
EnvError(String),
}Expand description
Strongly-typed error domain for Rullst ORM privacy and column encryption.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidKeyLength
The encryption key is missing or not exactly 32 bytes long.
InvalidKeyEncoding(&'static str)
A prefixed base64 or hexadecimal key could not be decoded.
InvalidKeyId
A key identifier was empty, too long, or contained an envelope delimiter.
InvalidEnvelope
A versioned encrypted value did not contain the required fields.
UnsupportedEnvelopeVersion(String)
The encrypted value belongs to an unknown future format.
KeyNotFound(String)
The configured keyring does not contain the key selected by the envelope.
The operating system could not provide a cryptographically secure nonce.
EncryptionFailed(String)
AES-GCM encryption failed.
DecryptionFailed(String)
AES-GCM decryption failed.
PayloadTooShort
The payload is shorter than the 12-byte nonce requirement.
Base64Error(String)
Base64 decoding failed.
Utf8Error(String)
Decrypted payload is not valid UTF-8.
EnvError(String)
Missing environment variable key.
Trait Implementations§
Source§impl Clone for PrivacyError
impl Clone for PrivacyError
Source§impl Debug for PrivacyError
impl Debug for PrivacyError
Source§impl Display for PrivacyError
impl Display for PrivacyError
impl Eq for PrivacyError
Source§impl Error for PrivacyError
impl Error for PrivacyError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<PrivacyError> for RullstError
impl From<PrivacyError> for RullstError
Source§fn from(err: PrivacyError) -> Self
fn from(err: PrivacyError) -> Self
Source§impl PartialEq for PrivacyError
impl PartialEq for PrivacyError
impl StructuralPartialEq for PrivacyError
Auto Trait Implementations§
impl Freeze for PrivacyError
impl RefUnwindSafe for PrivacyError
impl Send for PrivacyError
impl Sync for PrivacyError
impl Unpin for PrivacyError
impl UnsafeUnpin for PrivacyError
impl UnwindSafe for PrivacyError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more