pub enum KmsError {
KeyNotFound {
key_id: String,
},
KekFileIo {
path: PathBuf,
source: Error,
},
KekBadLength {
path: PathBuf,
expected: usize,
got: usize,
},
KekDirIo {
path: PathBuf,
source: Error,
},
WrappedDekTooShort {
got: usize,
min: usize,
},
UnwrapFailed {
key_id: String,
},
BackendUnavailable {
message: String,
},
}Variants§
KeyNotFound
KekFileIo
KekBadLength
KekDirIo
WrappedDekTooShort
LocalKms saw a wrapped-DEK ciphertext shorter than the
minimum (nonce + tag). Surface as a distinct error so audit
logs can tell “metadata corruption / truncation” apart from
“wrong key” / “tampered with”.
UnwrapFailed
AES-GCM authentication failure on unwrap. Either the wrapped
DEK was tampered with, or it was wrapped under a different
KEK than the one we’re holding for key_id.
Backend-specific transport error (network, AWS SDK, etc).
source is type-erased so the trait stays object-safe.
Trait Implementations§
Source§impl Error for KmsError
impl Error for KmsError
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()
Auto Trait Implementations§
impl Freeze for KmsError
impl !RefUnwindSafe for KmsError
impl Send for KmsError
impl Sync for KmsError
impl Unpin for KmsError
impl UnsafeUnpin for KmsError
impl !UnwindSafe for KmsError
Blanket Implementations§
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