pub enum ZffErrorKind {
Show 45 variants
IoError(Error),
PKCS5CryptoError,
ScryptErrorInvalidParams,
FromUtf8Error,
FileExtensionParserError,
EncryptionError,
Ed25519Error,
Base64DecodingError,
ComponentRangeError,
WrongSignatureKeyLength,
Lz4Error,
MissingEncryptionHeader,
MissingEncryptionKey,
DecryptionOfEncryptionKey,
ReadEOF,
InterruptedInputStream,
InterruptedOutputStream,
Custom,
UnknownFileType,
MissingHardlinkFilenumber,
HeaderDecodeError,
HeaderDecodeMismatchIdentifier,
HeaderDecoderKeyNotOnPosition,
HeaderDecodeEncryptedHeader,
DataDecodeChunkNumberNotInSegment,
NullOrNegativeSegmentNumber,
SegmentSizeToSmall,
MissingObjectHeaderForPresentObjectFooter,
MissingObjectNumber,
MissingFileNumber,
MismatchObjectType,
MainHeaderEncryptionError,
InvalidChunkNumber,
NoSignatureFoundAtChunk,
InvalidFlagValue,
MissingSegment,
MalformedSegment,
MalformedHeader,
UnknownObjectTypeValue,
NotAvailableForFileType,
UnimplementedFileType,
NoFilesLeft,
NoObjectsLeft,
NoChunksLeft,
Seek,
}Expand description
Contains the variants/kinds of errors, which could be find in this crate.
Variants§
IoError(Error)
contains a std::io::Error.
PKCS5CryptoError
contains a pkcs5::CryptoError.
ScryptErrorInvalidParams
contains a scrypt::errors::InvalidParams.
FromUtf8Error
contains a STD FromUtf8Error.
FileExtensionParserError
Error which occurs when parsing the file extension.
EncryptionError
contains a aes_gcm_siv::aead::Error.
Ed25519Error
contains a ed25519_dalek::ed25519::Error.
Base64DecodingError
contains a base64::DecodeError.
ComponentRangeError
contains a time::error::ComponentRange.
WrongSignatureKeyLength
If the signature key length is != 64.
Lz4Error
If an error occures while compressing the input data with the lz4-algorithm.
MissingEncryptionHeader
If the encryption header is missing, but you call a method to encrypt the header or data.
MissingEncryptionKey
Error returns, if an encryption operation expect an encryption key but none is given.
DecryptionOfEncryptionKey
Error will be returned, if the decryption of the inner encryption key fails.
ReadEOF
This is not an error in the strict sense. If you read a source file and reach the EOF, you will get this error kind to handle your next steps.
InterruptedInputStream
This error will be returned, if the input stream was interrupted. Interrupted operations can typically be retried.
InterruptedOutputStream
This error will be returned, if the output stream was interrupted. Interrupted operations can typically be retried.
Custom
Custom errors.
UnknownFileType
Error will be returned, if the given filetype is unknown.
MissingHardlinkFilenumber
Error will be returned, if the file number for the hard link is missing
HeaderDecodeError
Error will be returned, if the data could not be decoded to the given header.
HeaderDecodeMismatchIdentifier
Error will be returned, if the read identifier mismatch with the header identifier.
HeaderDecoderKeyNotOnPosition
Error will be returned, if the given value key is not on position.
HeaderDecodeEncryptedHeader
Error will be returned, if header is encrypted.
DataDecodeChunkNumberNotInSegment
Error will be returned, if you try to get the data of a chunk number which not exists in this segment.
NullOrNegativeSegmentNumber
Error will be returned, if you try to create a segment with a segment number < 1;
SegmentSizeToSmall
Error will be returned, if the segment size is too small.
Error will be returned, if an object footer is present in segments, but no appropriate object header
MissingObjectNumber
Error will be returned, if the object number looked for does not exist.
MissingFileNumber
Error will be returned, if the file number looked for does not exist.
MismatchObjectType
Error will be returned, if the object number mismatches the given object type.
MainHeaderEncryptionError
Error will be returned, if the main header could not be encrypted.
InvalidChunkNumber
Error will be returned, if the chunk number is not present in zff image.
NoSignatureFoundAtChunk
Error will be returned, if the selected chunk hasn’t have an ed25519 signature.
InvalidFlagValue
Error will be returned, if there is an invalid flag value.
MissingSegment
Error will be returned, if the appropriate segment is missing in the zff image.
MalformedSegment
Error will be returned, if the appropriate segment is malformed (e.g. the object header is missing)
MalformedHeader
Error will be returned, if the header is malformed.
UnknownObjectTypeValue
Error will be returned, if no object type exists for the given value
NotAvailableForFileType
Error will be returned, if you try to call a method, which is not available for this [FileType].
UnimplementedFileType
Error will be returned, if the underlying file type is not a File, a Directory or a Symlink.
NoFilesLeft
Error will be returned, if no files left in vector.
NoObjectsLeft
Error will be returned, if no objects left in vector/map.
NoChunksLeft
Error will be returned, if no chunks left in vector/map.
Seek
Error for Seek.
Trait Implementations§
Source§impl Debug for ZffErrorKind
impl Debug for ZffErrorKind
Auto Trait Implementations§
impl Freeze for ZffErrorKind
impl !RefUnwindSafe for ZffErrorKind
impl Send for ZffErrorKind
impl Sync for ZffErrorKind
impl Unpin for ZffErrorKind
impl !UnwindSafe for ZffErrorKind
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> 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