pub enum DetectionError {
UnsupportedExtension(String),
InvalidSchema(String),
Parse {
source_file: String,
source_row: usize,
message: String,
},
InvalidTimestamp {
source_file: String,
source_row: usize,
message: String,
},
InvalidIntrinsic {
source_file: String,
source_row: usize,
value: f64,
},
MissingCrs {
source_file: String,
source_row: usize,
},
ConflictingDetections {
timestamp: DateTime<FixedOffset>,
netelement_a: String,
netelement_b: String,
},
InvalidTimeRange {
source_file: String,
source_row: usize,
t_from: DateTime<FixedOffset>,
t_to: DateTime<FixedOffset>,
},
UnknownNetelement {
source_file: String,
source_row: usize,
netelement_id: String,
},
DuplicateResolution {
source_file: String,
source_row: usize,
},
Io(Error),
}Expand description
Errors produced by the detections pipeline (load/validate/filter/resolve).
ConflictingDetections and UnknownNetelement are FATAL per data-model.md
and abort path calculation. All other variants surface either as parse-time
failures or as recoverable DiscardReasons in DetectionRecord.
Variants§
UnsupportedExtension(String)
Input file extension is not .csv, .geojson, or .json.
InvalidSchema(String)
Required column / property missing or malformed schema.
Parse
Generic parser failure (CSV row, GeoJSON feature).
InvalidTimestamp
Timestamp could not be parsed or lacked a timezone offset.
InvalidIntrinsic
intrinsic / start_intrinsic / end_intrinsic not in [0, 1].
MissingCrs
Coordinate row supplied without a crs column / property.
ConflictingDetections
Two punctual detections at the same timestamp resolve to different netelements (FATAL, D4).
InvalidTimeRange
Linear detection has t_from > t_to.
UnknownNetelement
netelement_id does not exist in the supplied railway network (FATAL, FR-006).
DuplicateResolution
Internal invariant violation: a detection resolved twice.
Io(Error)
Wrapped std::io::Error.
Trait Implementations§
Source§impl Debug for DetectionError
impl Debug for DetectionError
Source§impl Display for DetectionError
impl Display for DetectionError
Source§impl Error for DetectionError
impl Error for DetectionError
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()
Auto Trait Implementations§
impl Freeze for DetectionError
impl !RefUnwindSafe for DetectionError
impl Send for DetectionError
impl Sync for DetectionError
impl Unpin for DetectionError
impl UnsafeUnpin for DetectionError
impl !UnwindSafe for DetectionError
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string()] Read more§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString]. Read more