Skip to content
API REFERENCEUsage guides →

cellpack::Error ​

enum

Module contract · All interfaces

At a glance ​

pub enum Error {
    InvalidInput(&'static str),
    InvalidOptions(&'static str),
    OutputTooSmall {
        need: usize,
        have: usize,
    },
    WorkspaceTooSmall {
        need: usize,
        have: usize,
    },
    OutputTypeTooNarrow(u64),
    RowOutOfRange {
        row: usize,
        n_rows: usize,
    },
    TablesMismatch,
    CorruptMeta(&'static str),
    CorruptRecord(&'static str),
    Io {
        kind: ErrorKind,
        message: String,
    },
}

Why an operation failed.

The variants split by fault: arguments and options of the caller (Error::InvalidInput, Error::InvalidOptions, Error::OutputTooSmall, Error::WorkspaceTooSmall, Error::OutputTypeTooNarrow, Error::RowOutOfRange, Error::TablesMismatch), damaged bytes (Error::CorruptMeta, Error::CorruptRecord) and the environment (Error::Io).

Fields and variants ​

InvalidInput ​

InvalidInput(&'static str)

An argument, a source matrix or a cell violates the input contract.

InvalidOptions ​

InvalidOptions(&'static str)

An option lies outside its accepted range or contradicts another.

OutputTooSmall ​

OutputTooSmall

A caller buffer does not have the size the call requires: smaller than the output, or not the exact length of an exact-size read.

WorkspaceTooSmall ​

WorkspaceTooSmall

A scratch workspace is smaller than the call requires. Sizes are in u64 words.

OutputTypeTooNarrow ​

OutputTypeTooNarrow(u64)

The requested output integer type cannot hold every value it would receive.

RowOutOfRange ​

RowOutOfRange

A row, cell or chunk index is at or past the count it indexes.

TablesMismatch ​

TablesMismatch

The tables were built for another chunk’s metadata.

CorruptMeta ​

CorruptMeta(&'static str)

File or chunk metadata contradicts itself or the layout; the message names the check.

CorruptRecord ​

CorruptRecord(&'static str)

A record’s bytes contradict its metadata; the message names the check.

Io ​

Io

A file operation failed.

Implemented traits ​

impl Clone for Error
impl Debug for Error
impl Display for Error
impl Error for Error
impl From<Error> for Error
impl From<Error> for Error
impl PartialEq for Error

Contract reference ​

See the module reference for semantic input/output rules, units, allocation, mutation, failure behavior, and lifetime requirements. Declarations and documented members are synchronized from the crate source.

Definition