ZffErrorKind

Enum ZffErrorKind 

Source
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.

§

MissingObjectHeaderForPresentObjectFooter

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

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for ZffErrorKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V