#[non_exhaustive]pub enum LogError {
Syntax {
format: &'static str,
line: usize,
message: String,
},
NotThisFormat {
format: &'static str,
message: String,
},
Unrecognized {
message: String,
},
NoData {
format: &'static str,
},
Binary {
format: &'static str,
offset: usize,
message: String,
},
Archive {
message: String,
},
Workbook {
message: String,
},
Choice {
message: String,
},
FipHeader {
message: String,
},
Unit {
format: &'static str,
line: usize,
message: String,
},
Mapping {
message: String,
},
Layout {
message: String,
},
}Expand description
An error reading a flight log: the text isn’t the format it should be, or its data can’t be a flight’s record.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Syntax
A line of the file is malformed.
Fields
NotThisFormat
The file isn’t in the format asked for.
Unrecognized
The file is in none of the formats HPR Sim reads.
NoData
The file has no data rows.
Binary
A binary file’s bytes aren’t laid out as its format’s, such as a frame whose checksum fails.
Fields
Archive
A zip archive can’t be unpacked, or holds more than the bounds allow
(archive).
Workbook
An .xlsx workbook’s parts can’t be read as one, or its sheets pass the bounds
(workbook).
Choice
A file that holds several records, a spreadsheet’s sheets or a dump’s recordings, read
with no choice of one where it holds no one record, or with a choice it doesn’t take or
doesn’t hold (import::read_one).
FipHeader
A header stated for a Raven FIP export that lost its own can’t be read
(custom::fip_header_from_json).
Unit
The file states its values in a unit the reader doesn’t know, such as a PerfectFlite file whose stated apogee carries no foot mark.
Fields
Mapping
A column mapping the caller gave can’t read the file: it names no column or too many,
its clock isn’t one of its columns or isn’t in a unit of time, or a column’s unit isn’t
one the reader knows or doesn’t measure what its quantity does
(generic::read_with); or a header line the caller stated
for a FIP export’s rows isn’t a FIP header, holds no altitude above the pad, or comes with
a pasted column numbered 0 (raven::read_rows,
raven::read_rows_around).
Layout
Trait Implementations§
Source§impl Error for LogError
impl Error for LogError
1.30.0 · 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()