#[non_exhaustive]pub enum CalibrationError {
CsvParse {
line: usize,
reason: String,
},
TimestampParse {
line: usize,
value: String,
reason: String,
},
EmptyData,
Io(Error),
TomlParse(Error),
Validation(String),
}Expand description
Errors that can occur during calibration.
#[non_exhaustive] for SemVer-minor variant additions.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
CsvParse
A CSV row had the wrong number of columns, unparseable numeric
values or an unknown header layout. line is 1-indexed.
TimestampParse
An ISO 8601 timestamp column could not be parsed. Covers missing
Z suffix, non-UTC offsets and out-of-range date/time fields.
EmptyData
The CSV parsed successfully but contained zero data rows. At least one measurement is required to compute a calibration.
Io(Error)
Underlying filesystem I/O error when reading the CSV or writing the calibration TOML output.
TomlParse(Error)
The calibration TOML file loaded via [green] calibration_file
failed TOML deserialization (malformed syntax, wrong types).
Validation(String)
A semantic validation check failed on an otherwise well-formed calibration TOML: negative or non-finite factor, missing base energy or a service factor outside the accepted range.
Trait Implementations§
Source§impl Debug for CalibrationError
impl Debug for CalibrationError
Source§impl Display for CalibrationError
impl Display for CalibrationError
Source§impl Error for CalibrationError
impl Error for CalibrationError
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()
Source§impl From<Error> for CalibrationError
impl From<Error> for CalibrationError
Auto Trait Implementations§
impl !RefUnwindSafe for CalibrationError
impl !UnwindSafe for CalibrationError
impl Freeze for CalibrationError
impl Send for CalibrationError
impl Sync for CalibrationError
impl Unpin for CalibrationError
impl UnsafeUnpin for CalibrationError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request