#[non_exhaustive]pub enum LuksError {
NotLuks {
found: [u8; 6],
},
UnsupportedVersion {
version: u16,
},
Unsupported {
what: &'static str,
value: String,
},
MalformedHeader {
what: &'static str,
need: usize,
got: usize,
},
AuthenticationFailed,
NoActiveKeyslot,
Io(Error),
}Expand description
A LUKS parse or unlock failure. Every variant names the offending value so an investigator can act on it (never a bare “invalid”).
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.
NotLuks
The LUKS\xba\xbe magic is absent — not a LUKS container.
UnsupportedVersion
The header version is neither 1 nor 2.
Unsupported
The cipher/mode/hash combination has no validated decrypt path.
Fields
MalformedHeader
The header is structurally malformed (a field runs past the buffer).
AuthenticationFailed
No keyslot could be unlocked with the supplied passphrase, or the derived master key failed the mk-digest check (wrong passphrase).
NoActiveKeyslot
The container carries no active (enabled) keyslot.
Io(Error)
An I/O error reading the container.
Trait Implementations§
Source§impl Error for LuksError
impl Error for LuksError
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 !RefUnwindSafe for LuksError
impl !UnwindSafe for LuksError
impl Freeze for LuksError
impl Send for LuksError
impl Sync for LuksError
impl Unpin for LuksError
impl UnsafeUnpin for LuksError
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