facet_format_xml/lib.rs
1#![deny(unsafe_code)]
2// Note: streaming.rs uses limited unsafe for lifetime extension in YieldingReader
3
4//! XML parser that implements `FormatParser` for the codex prototype.
5//!
6//! This uses quick-xml for the underlying XML parsing and translates its
7//! events into the format-agnostic ParseEvent stream.
8
9mod parser;
10mod serializer;
11
12#[cfg(feature = "streaming")]
13mod streaming;
14
15pub use parser::{XmlError, XmlParser};
16pub use serializer::{XmlSerializeError, XmlSerializer, to_vec};
17
18#[cfg(all(feature = "streaming", feature = "std"))]
19pub use streaming::from_reader;
20
21#[cfg(feature = "tokio")]
22pub use streaming::from_async_reader_tokio;