From 17a38f190b75f0346dcce25390c6e8a8782caf33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Sch=C3=A4fer?= Date: Tue, 18 Jun 2024 16:59:46 +0200 Subject: [PATCH] xso: mark iterator type as non-breaking to change Just like with the builder type, the concrete iterator type on IntoXml is supposed to be an implementation detail. That allows switching freely between various ways to generate such a type. --- xso/src/lib.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/xso/src/lib.rs b/xso/src/lib.rs index d9bd748a..a5d291c7 100644 --- a/xso/src/lib.rs +++ b/xso/src/lib.rs @@ -27,8 +27,18 @@ pub mod exports { /// Trait allowing to consume a struct and iterate its contents as /// serialisable [`rxml::Event`] items. +/// +/// **Important:** Changing the [`EventIter`][`Self::EventIter`] associated +/// type is considered a non-breaking change for any given implementation of +/// this trait. Always refer to a type's iterator type using fully-qualified +/// notation, for example: `::EventIter`. pub trait IntoXml { /// The iterator type. + /// + /// **Important:** Changing this type is considered a non-breaking change + /// for any given implementation of this trait. Always refer to a type's + /// iterator type using fully-qualified notation, for example: + /// `::EventIter`. type EventIter: Iterator>; /// Return an iterator which emits the contents of the struct or enum as