pub fn from_str_in_envelope<T: DeserializeOwned>(
xml: &str,
) -> Result<T, ParseError>Expand description
Deserialize an ISO 20022 XML message and tag any deserialization failure with the detected message identifier.
Behaves like from_str on success. On failure, if the envelope
detection succeeded the error is returned as
ParseError::DeserializeIn carrying the dotted message ID
(e.g. "pacs.008.001.13"); if envelope detection itself failed,
the underlying quick_xml error is returned via
ParseError::Deserialize unchanged.
Useful when the XML may be one of several pacs/pain/camt/head
messages and an opaque quick_xml diagnostic alone is not enough
to tell the user which schema mismatched.
ยงErrors
Returns ParseError::DeserializeIn when envelope detection
succeeded but deserialization failed; returns
ParseError::Deserialize otherwise.