pub enum MapperError {
DataDirNotFound {
path: String,
},
BundleNotFound {
fv: String,
},
VariantNotFound {
fv: String,
variant: String,
},
PidNotFound {
fv: String,
variant: String,
pid: String,
},
Assembly(AssemblyError),
Mapping(MappingError),
Serialization(String),
NoMigSchema {
fv: String,
variant: String,
},
MissingGroupEntrySegment(Box<GroupEntrySegmentError>),
MalformedEnvelopeDateTime {
field: &'static str,
expected: &'static str,
digits: usize,
value: String,
},
BundleFromOtherRelease {
fv: String,
built_by: Option<String>,
expected: String,
path: String,
},
Io(Error),
}Expand description
Errors that can occur when using the Mapper API.
Variants§
DataDirNotFound
The specified data directory does not exist on disk.
BundleNotFound
No data bundle file found for the requested format version.
VariantNotFound
The requested variant (e.g., “UTILMD_Strom”) is not present in the bundle.
PidNotFound
No mapping engine definitions exist for the given PID within the variant.
Assembly(AssemblyError)
An error from the MIG assembly layer.
Mapping(MappingError)
An error from the TOML mapping engine.
Serialization(String)
JSON serialization failed (e.g., when converting a typed struct to JSON).
NoMigSchema
The variant has no MIG schema (required for reverse pipeline).
MissingGroupEntrySegment(Box<GroupEntrySegmentError>)
The BO4E input fills a group’s segments but not the segment that opens
the group in the MIG (e.g. Zaehler.geraeteNummer without
Zaehler.zaehlertypMerkmal would yield SG10 CAV without CCI).
Rendering it would produce EDIFACT no receiver can assemble, so the
conversion is refused. Boxed to keep MapperError small.
MalformedEnvelopeDateTime
An EnvelopeOptions date or time is not the
shape UNB takes.
The value is written into the interchange header verbatim, so a wrongly
formatted one produces a malformed outermost envelope — the segment
whose defects surface at the receiving gateway rather than anywhere the
sender can see them. datum is yymmdd and zeit is hhmm, both
digits only.
Fields
BundleFromOtherRelease
The data bundle was produced by a different release than this crate.
The bundle’s serialisation format can be current while its mappings, schemas and code lists are from another era — that combination loads cleanly and renders a smaller message rather than failing (issue #158).
Fields
Io(Error)
A standard I/O error.
Trait Implementations§
Source§impl Debug for MapperError
impl Debug for MapperError
Source§impl Display for MapperError
impl Display for MapperError
Source§impl Error for MapperError
impl Error for MapperError
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()