Skip to main content

DryIceError

Enum DryIceError 

Source
pub enum DryIceError {
Show 23 variants Io(Error), InvalidWriterConfiguration(&'static str), InvalidReaderConfiguration(&'static str), MismatchedSequenceAndQualityLengths { sequence_len: usize, quality_len: usize, }, MissingRequiredField { field: &'static str, }, InvalidSequenceInput { message: &'static str, }, InvalidQualityInput { message: &'static str, }, UnsupportedFormatVersion { version: u32, }, InvalidMagic, CorruptBlockHeader { message: &'static str, }, CorruptBlockLayout { message: &'static str, }, CorruptRecordIndex { entry: usize, message: &'static str, }, MissingRequiredSection { section: &'static str, }, UnexpectedSection { section: &'static str, }, ChecksumMismatch, RecordDecode { record_index: usize, message: &'static str, }, RecordKeyTypeMismatch, MissingRecordKeySection, InvalidRecordKeyEncoding { message: &'static str, }, SequenceCodecMismatch { expected: [u8; 16], found: [u8; 16], }, QualityCodecMismatch { expected: [u8; 16], found: [u8; 16], }, NameCodecMismatch { expected: [u8; 16], found: [u8; 16], }, SectionOverflow { field: &'static str, },
}
Expand description

Top-level error type for all dryice operations.

This enum is organized into broad categories: transport/IO errors, configuration errors, input-record validity errors, format identity and version errors, structural corruption errors, unsupported feature errors, and integrity/decode failures.

Variants§

§

Io(Error)

An underlying I/O error occurred.

§

InvalidWriterConfiguration(&'static str)

The writer configuration is invalid.

§

InvalidReaderConfiguration(&'static str)

The reader configuration is invalid.

§

MismatchedSequenceAndQualityLengths

Sequence and quality lengths do not match.

Fields

§sequence_len: usize

Length of the sequence field.

§quality_len: usize

Length of the quality field.

§

MissingRequiredField

A required record field is missing or empty.

Fields

§field: &'static str

Name of the missing field.

§

InvalidSequenceInput

Sequence data is not valid for the selected encoding.

Fields

§message: &'static str

Description of the problem.

§

InvalidQualityInput

Quality data is not valid for the selected encoding.

Fields

§message: &'static str

Description of the problem.

§

UnsupportedFormatVersion

The file uses a format version this build does not support.

Fields

§version: u32

The version number found in the file header.

§

InvalidMagic

The file does not begin with valid dryice magic bytes.

§

CorruptBlockHeader

A block header could not be parsed.

Fields

§message: &'static str

Description of the corruption.

§

CorruptBlockLayout

Block layout metadata is inconsistent or unreadable.

Fields

§message: &'static str

Description of the corruption.

§

CorruptRecordIndex

A record index entry is corrupt or out of range.

Fields

§entry: usize

Zero-based index of the problematic entry.

§message: &'static str

Description of the corruption.

§

MissingRequiredSection

A section that should be present in this block is missing.

Fields

§section: &'static str

Name of the missing section.

§

UnexpectedSection

A section is present but should not be for this block configuration.

Fields

§section: &'static str

Name of the unexpected section.

§

ChecksumMismatch

A block checksum did not match the computed value.

§

RecordDecode

A record could not be decoded from block data.

Fields

§record_index: usize

Zero-based index of the record within the block.

§message: &'static str

Description of the decode failure.

§

RecordKeyTypeMismatch

Record-key metadata in the block does not match the configured key type.

§

MissingRecordKeySection

A record-key section is required but missing.

§

InvalidRecordKeyEncoding

A record-key encoding or decoding operation failed.

Fields

§message: &'static str

Description of the problem.

§

SequenceCodecMismatch

The block’s sequence codec tag does not match the reader’s configured codec.

Fields

§expected: [u8; 16]

The tag the reader expected.

§found: [u8; 16]

The tag found in the block header.

§

QualityCodecMismatch

The block’s quality codec tag does not match the reader’s configured codec.

Fields

§expected: [u8; 16]

The tag the reader expected.

§found: [u8; 16]

The tag found in the block header.

§

NameCodecMismatch

The block’s name codec tag does not match the reader’s configured codec.

Fields

§expected: [u8; 16]

The tag the reader expected.

§found: [u8; 16]

The tag found in the block header.

§

SectionOverflow

A value exceeds the maximum representable size for the format.

Fields

§field: &'static str

Which field or section overflowed.

Trait Implementations§

Source§

impl Debug for DryIceError

Source§

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

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

impl Display for DryIceError

Source§

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

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

impl Error for DryIceError

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 From<Error> for DryIceError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.

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