#[non_exhaustive]pub enum Error {
Io(Error),
Xml {
message: String,
source: Option<String>,
position: Option<u64>,
},
Truncated {
open: Option<String>,
source: Option<String>,
position: u64,
},
NotCimXml {
message: String,
source: Option<String>,
position: Option<u64>,
},
DanglingReference {
object: String,
attribute: &'static str,
target: String,
total: usize,
},
SchemaMismatch {
left: &'static str,
right: &'static str,
},
UnknownVintage {
path: String,
known: Vec<&'static str>,
},
Zip(String),
InputTooLarge {
limit: u64,
read: u64,
source: Option<String>,
},
}Expand description
A hard failure: the operation could not be completed.
Problems that leave the data usable (an unknown class, an unresolved reference in
lenient mode) are Diagnostics instead.
#[non_exhaustive]: match with a wildcard arm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Io(Error)
Xml
The document is not well-formed XML: an end tag that does not match, a second document element, text outside it, a broken attribute.
Fields
Truncated
The input ended before the document did — typically an interrupted transfer.
Distinct from Error::Xml so a pipeline can fetch the file again rather than
reject its producer.
Fields
NotCimXml
The document is well-formed XML but not a CIM/XML document (or, under
Strictness::Strict, names something the
schema does not define).
DanglingReference
A reference could not be resolved and the link policy is strict.
Fields
SchemaMismatch
Two models built from different CIM vintages cannot be combined.
Class and attribute identifiers index one vintage’s tables and mean something else in another.
UnknownVintage
No file under the given path declares a CIM vocabulary this build recognises.
Either the input is not CIM/XML, or it is a vintage this build has no feature for.
Zip(String)
A zip archive could not be read.
InputTooLarge
The input exceeded ReadOptions::max_input_bytes.
The budget covers one load call, every file and decompressed archive entry of it. Never downgraded to a diagnostic by lenient reading: the dataset is incomplete and should be discarded.
Implementations§
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()