xso: add useful note
I tried to remove it, fell into that trap. Let's save the next person some work.
This commit is contained in:
parent
c4de8725fc
commit
a7d556ce6f
1 changed files with 5 additions and 0 deletions
|
|
@ -454,6 +454,11 @@ where
|
||||||
|
|
||||||
/// Helper struct to stream a struct which implements conversion
|
/// Helper struct to stream a struct which implements conversion
|
||||||
/// to [`minidom::Element`].
|
/// to [`minidom::Element`].
|
||||||
|
// NOTE to developers: The 'x lifetime looks unnecessary, but in fact we need
|
||||||
|
// it because of the `AsXml` signature. It requires the iterator type to have
|
||||||
|
// a lifetime parameter which matches the Item's lifetimes. Even though it
|
||||||
|
// would strictly be valid to return something with 'static lifetime when any
|
||||||
|
// other lifetime 'a is required, rustc doesn't let us do that.
|
||||||
pub struct AsItemsViaElement<'x> {
|
pub struct AsItemsViaElement<'x> {
|
||||||
iter: EventToItem<IntoEvents>,
|
iter: EventToItem<IntoEvents>,
|
||||||
lifetime_binding: PhantomData<Item<'x>>,
|
lifetime_binding: PhantomData<Item<'x>>,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue