#[non_exhaustive]pub enum Error {
Io(Error),
InvalidLineLength {
got: usize,
},
ParseField {
field: &'static str,
value: String,
source: Box<dyn Error + Send + Sync + 'static>,
},
UnknownDatatype {
code: String,
},
UnsupportedDatatype(DataType),
TruncatedWaveform {
path: PathBuf,
offset: u64,
needed: usize,
got: usize,
},
WaveformNotFound {
tried: Vec<PathBuf>,
},
SampleSizeExceeded {
requested: usize,
max: usize,
},
InvalidFieldValue {
field: &'static str,
reason: &'static str,
},
InvalidUtf8 {
field: &'static str,
start: usize,
end: usize,
},
MixedSchemaInLockedMode {
got: usize,
schema: Schema,
expected: usize,
},
PathTraversal {
base: PathBuf,
reason: &'static str,
},
}Expand description
All errors produced by this crate.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Io(Error)
Underlying I/O failure (open, read, seek, decompress).
InvalidLineLength
A wfdisc line did not match either CSS 3.0 (283 chars) or NNSA KB Core (287 chars) length.
ParseField
A numeric field could not be parsed.
Fields
UnknownDatatype
The two-character datatype code was not recognised at all.
UnsupportedDatatype(DataType)
A datatype code is recognised but sample decoding is not implemented (currently: ASCII and CSS compressed variants).
TruncatedWaveform
The referenced .w data file did not contain enough bytes at the
requested offset.
Fields
WaveformNotFound
The waveform file referenced from a wfdisc row could not be located.
SampleSizeExceeded
Decoding would allocate more sample bytes than the configured cap.
Fields
max: usizeConfigured maximum (see crate::DEFAULT_MAX_SAMPLE_BYTES).
InvalidFieldValue
A numeric or path field failed semantic validation after parse.
Fields
InvalidUtf8
A fixed-width column slice is not valid UTF-8 at the column boundary.
Fields
MixedSchemaInLockedMode
A wfdisc line does not match the reader’s locked fixed-width schema.
Fields
PathTraversal
Sandboxed sample read rejected an unsafe path component.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()