#[non_exhaustive]pub enum Error {
Show 32 variants
IOError(Error),
WrongMagic,
UnsupportedVersion,
InvalidKeyFormat,
WrongBlockSubFileType,
UTF8ConversionError(FromUtf8Error),
EntryNameTooLong,
WrongArchiveWriterState {
current_state: String,
expected_state: String,
},
AssertionError(String),
WrongReaderState(String),
WrongWriterState(String),
RandError,
PrivateKeyNeeded,
DeserializationError,
SerializationError,
MissingMetadata,
BadAPIArgument(String),
EndOfStream,
ConfigError(ConfigError),
DuplicateEntryName,
AuthenticatedDecryptionWrongTag,
HKDFInvalidKeyLength,
HPKEError,
InvalidLastTag,
EncryptionAskedButNotMarkedPresent,
WrongEndMagic,
NoValidSignatureFound,
SignatureVerificationAskedButNoSignatureLayerFound,
MissingEndOfEncryptedInnerLayerMagic,
TruncatedTag,
UnknownTagPosition,
Other(String),
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
IOError(Error)
IO Error (not enough data, etc.)
WrongMagic
Wrong magic, must be “MLAFAAA”
UnsupportedVersion
Unsupported version, must be 2
InvalidKeyFormat
Supplied key is not in the expected format
WrongBlockSubFileType
Wrong BlockSubFile magic has been encountered. Is the deserializion
starting at the beginning of a block?
UTF8ConversionError(FromUtf8Error)
An error has occurred while converting into UTF8. This error could happens while parsing the entry data name
EntryNameTooLong
EntryNames have a limited size ENTRY_NAME_MAX_SIZE
WrongArchiveWriterState
The writer state is not in the expected state for the current operation
AssertionError(String)
Should never happens: an internal assumptions no more hold
WrongReaderState(String)
The reader state is not in the expected state for the current operation
WrongWriterState(String)
The writer state is not in the expected state for the current operation
RandError
Error with the inner random generator
PrivateKeyNeeded
A Private Key is required to decrypt the encrypted cipher key
DeserializationError
Deserialization error. May happens when starting from a wrong offset / version mismatch
SerializationError
Serialization error. May happens on I/O errors
MissingMetadata
Missing metadata (usually means the footer has not been correctly read,
a clean-truncated operation might be needed)
BadAPIArgument(String)
Error returned on API call with incorrect argument
EndOfStream
End of stream reached, no more data should be expected
ConfigError(ConfigError)
An error happens in the configuration
DuplicateEntryName
EntryName already used
AuthenticatedDecryptionWrongTag
Wrong tag while decrypting authenticated data
HKDFInvalidKeyLength
Unable to expand while using the HKDF
HPKEError
Error during HPKE computation
InvalidLastTag
Invalid last tag
EncryptionAskedButNotMarkedPresent
User asked for encryption but archive was not marked as encrypted
WrongEndMagic
MLA archive must be terminated by EMLAAAAA