xmlstream: re-introduce syntax-highlit logging of XML stream I/O

This commit is contained in:
Jonas Schäfer 2024-08-18 09:37:32 +02:00
commit efc859abc0
5 changed files with 383 additions and 59 deletions

View file

@ -83,14 +83,7 @@ impl<Io: AsyncBufRead + AsyncWrite + Unpin> PendingFeaturesSend<Io> {
features: &'_ StreamFeatures,
) -> io::Result<XmlStream<Io, T>> {
let Self { mut stream } = self;
let iter = features
.as_xml_iter()
.map_err(|e| io::Error::new(io::ErrorKind::InvalidInput, e))?;
for item in iter {
let item = item.map_err(|e| io::Error::new(io::ErrorKind::InvalidInput, e))?;
stream.send(item).await?;
}
Pin::new(&mut stream).start_send_xso(features)?;
stream.flush().await?;
Ok(XmlStream::wrap(stream))