Skip to main content

detect

Function detect 

Source
pub fn detect(xml: &[u8]) -> Result<DocumentType, RedispatchXmlError>
Expand description

Detect the document type of a Redispatch 2.0 XML message without fully deserializing it.

ยงErrors

Returns RedispatchXmlError::UnknownDocumentType if the root element is not a recognised Redispatch 2.0 document type.