xso: document some specific trait implementations

This commit is contained in:
Jonas Schäfer 2024-08-10 09:34:05 +02:00
commit ad2c79cbe7
2 changed files with 10 additions and 0 deletions

View file

@ -38,6 +38,8 @@ impl<'x, T: Iterator<Item = Result<Item<'x>, Error>>> Iterator for OptionAsXml<T
}
}
/// Emits the contents of `Some(.)` unchanged if present and nothing
/// otherwise.
impl<T: AsXml> AsXml for Option<T> {
type ItemIter<'x> = OptionAsXml<T::ItemIter<'x>> where T: 'x;
@ -60,6 +62,7 @@ impl<'x, T: Iterator<Item = Result<Item<'x>, Error>>> Iterator for BoxAsXml<T> {
}
}
/// Emits the contents of `T` unchanged.
impl<T: AsXml> AsXml for Box<T> {
type ItemIter<'x> = BoxAsXml<T::ItemIter<'x>> where T: 'x;