Skip to main content

CompressionError

Enum CompressionError 

Source
pub enum CompressionError {
    BufferOperationFailed {
        operation: &'static str,
        algorithm: Algorithm,
        input_len: usize,
        output_capacity: usize,
    },
    StreamInitFailed {
        operation: &'static str,
        algorithm: Algorithm,
    },
    StreamProcessFailed {
        operation: &'static str,
        algorithm: Algorithm,
        status: i32,
    },
    StreamStalled {
        operation: &'static str,
        algorithm: Algorithm,
    },
    StreamFinished {
        operation: &'static str,
        algorithm: Algorithm,
    },
    OperationFailed {
        operation: &'static str,
        code: i32,
    },
    NullHandle {
        operation: &'static str,
    },
    Closed {
        resource: &'static str,
    },
    InvalidFieldKey {
        key: String,
    },
    InvalidHashLength {
        expected: usize,
        actual: usize,
    },
    NulByte {
        argument: &'static str,
    },
    Utf8Error {
        operation: &'static str,
    },
}
Expand description

Wraps failures returned by Compression and AppleArchive helpers.

Variants§

§

BufferOperationFailed

Wraps the BufferOperationFailed failure case reported by Compression or AppleArchive helpers.

Fields

§operation: &'static str

Wraps the failing Compression or AppleArchive entry-point name.

§algorithm: Algorithm

Wraps the algorithm associated with the failing Compression call.

§input_len: usize

Wraps the input length passed to the failing buffer operation.

§output_capacity: usize

Wraps the destination capacity passed to the failing buffer operation.

§

StreamInitFailed

Wraps the StreamInitFailed failure case reported by Compression or AppleArchive helpers.

Fields

§operation: &'static str

Wraps the failing Compression or AppleArchive entry-point name.

§algorithm: Algorithm

Wraps the algorithm associated with the failing Compression call.

§

StreamProcessFailed

Wraps the StreamProcessFailed failure case reported by Compression or AppleArchive helpers.

Fields

§operation: &'static str

Wraps the failing Compression or AppleArchive entry-point name.

§algorithm: Algorithm

Wraps the algorithm associated with the failing Compression call.

§status: i32

Wraps the compression_stream_process status code.

§

StreamStalled

Wraps the StreamStalled failure case reported by Compression or AppleArchive helpers.

Fields

§operation: &'static str

Wraps the failing Compression or AppleArchive entry-point name.

§algorithm: Algorithm

Wraps the algorithm associated with the failing Compression call.

§

StreamFinished

Wraps the StreamFinished failure case reported by Compression or AppleArchive helpers.

Fields

§operation: &'static str

Wraps the failing Compression or AppleArchive entry-point name.

§algorithm: Algorithm

Wraps the algorithm associated with the failing Compression call.

§

OperationFailed

Wraps the OperationFailed failure case reported by Compression or AppleArchive helpers.

Fields

§operation: &'static str

Wraps the failing Compression or AppleArchive entry-point name.

§code: i32

Wraps the failing Compression or AppleArchive status code.

§

NullHandle

Wraps the NullHandle failure case reported by Compression or AppleArchive helpers.

Fields

§operation: &'static str

Wraps the failing Compression or AppleArchive entry-point name.

§

Closed

Wraps the Closed failure case reported by Compression or AppleArchive helpers.

Fields

§resource: &'static str

Wraps the closed resource name reported by AppleArchive helpers.

§

InvalidFieldKey

Wraps the InvalidFieldKey failure case reported by Compression or AppleArchive helpers.

Fields

§key: String

Wraps the invalid AppleArchive field key.

§

InvalidHashLength

Wraps the InvalidHashLength failure case reported by Compression or AppleArchive helpers.

Fields

§expected: usize

Wraps the expected hash length.

§actual: usize

Wraps the actual hash length.

§

NulByte

Wraps the NulByte failure case reported by Compression or AppleArchive helpers.

Fields

§argument: &'static str

Wraps the argument name that contained an interior NUL byte.

§

Utf8Error

Wraps the Utf8Error failure case reported by Compression or AppleArchive helpers.

Fields

§operation: &'static str

Wraps the failing Compression or AppleArchive entry-point name.

Trait Implementations§

Source§

impl Clone for CompressionError

Source§

fn clone(&self) -> CompressionError

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CompressionError

Source§

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

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

impl Display for CompressionError

Source§

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

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

impl Eq for CompressionError

Source§

impl Error for CompressionError

1.30.0 · Source§

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

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl PartialEq for CompressionError

Source§

fn eq(&self, other: &CompressionError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for CompressionError

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.