pub enum Error {
Show 21 variants
FileHeaderMismatch(Option<String>),
VersionMismatch(Option<Vec<u8>>),
NoData,
NoParentDir(String),
GVariantDeserialization(Error),
SaltSizeMismatch(usize, u32),
WeakKey(WeakKeyError),
Io(Error),
MacError,
ChecksumMismatch,
HashedAttributeMac(String),
NoDataDir,
TargetFileChanged(String),
Portal(Error),
InvalidItemIndex(usize),
Utf8(Utf8Error),
AlgorithmMismatch(u8),
IncorrectSecret,
PartiallyCorruptedKeyring {
valid_items: usize,
broken_items: usize,
},
Crypto(Error),
Locked,
}Expand description
File backend specific errors.
Variants§
FileHeaderMismatch(Option<String>)
File header does not match FILE_HEADER.
VersionMismatch(Option<Vec<u8>>)
Version bytes do not match MAJOR_VERSION or MINOR_VERSION.
NoData
No data behind header and version bytes.
NoParentDir(String)
No Parent directory.
GVariantDeserialization(Error)
Bytes don’t have the expected GVariant format.
SaltSizeMismatch(usize, u32)
Mismatch between array length and length explicitly stored in keyring
WeakKey(WeakKeyError)
Key for some reason too weak to trust it for writing
Io(Error)
Input/Output.
MacError
Unexpected MAC digest value.
ChecksumMismatch
Mismatch of checksum calculated over data.
HashedAttributeMac(String)
Failure to validate the attributes.
NoDataDir
XDG_DATA_HOME required for reading from default location.
TargetFileChanged(String)
Target file has changed.
Portal(Error)
Portal request has been cancelled.
InvalidItemIndex(usize)
The addressed index does not exist.
Utf8(Utf8Error)
UTF-8 encoding error.
AlgorithmMismatch(u8)
Mismatch of algorithms used in legacy keyring file.
IncorrectSecret
Incorrect secret - no items could be decrypted
PartiallyCorruptedKeyring
Keyring partially corrupted - more broken items than valid ones
Crypto(Error)
Crypto related error.
Locked
Keyring or item is locked