#[non_exhaustive]pub enum RedispatchXmlError {
Xml(Error),
Deserialize(DeError),
Serialize(String),
InvalidDocumentId(String),
InvalidDocumentVersion(u32),
InvalidTimestamp(String),
InvalidMarketParticipantId(String),
InvalidTimeInterval(String),
UnknownDocumentType(String),
NamespaceMismatch {
expected: &'static str,
found: String,
},
StructuralError(String),
}Expand description
All errors that can occur when parsing, validating, or serializing Redispatch 2.0 XML documents.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Xml(Error)
Low-level XML tokenization or encoding error from quick-xml.
Deserialize(DeError)
Serde-based deserialization error.
Serialize(String)
Serde-based serialization error.
InvalidDocumentId(String)
A document identifier violates the XSD constraint (1–35 characters).
InvalidDocumentVersion(u32)
A document version number violates the XSD constraint (integer 1–999).
InvalidTimestamp(String)
A UTC timestamp is malformed or uses a non-UTC offset.
All BDEW Redispatch 2.0 timestamps must end with Z (UTC).
InvalidMarketParticipantId(String)
A market participant ID violates the XSD pattern (exactly 13 decimal digits).
InvalidTimeInterval(String)
A time interval string is malformed.
BDEW intervals use minute-precision UTC: yyyy-mm-ddThh:mmZ/yyyy-mm-ddThh:mmZ.
UnknownDocumentType(String)
The root element is not a recognised Redispatch 2.0 document type.
NamespaceMismatch
The XML namespace URI on the root element does not match the expected value.
StructuralError(String)
An XSD structural constraint (maxLength, pattern, range, enumeration) was violated during explicit validation.
Trait Implementations§
Source§impl Debug for RedispatchXmlError
impl Debug for RedispatchXmlError
Source§impl Display for RedispatchXmlError
impl Display for RedispatchXmlError
Source§impl Error for RedispatchXmlError
impl Error for RedispatchXmlError
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()