mirror of
https://gitlab.com/xmpp-rs/xmpp-rs.git
synced 2024-07-12 22:21:53 +00:00
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.
This commit is contained in:
parent
a1bee56ee1
commit
17a38f190b
1 changed files with 10 additions and 0 deletions
|
@ -27,8 +27,18 @@ pub mod exports {
|
||||||
|
|
||||||
/// Trait allowing to consume a struct and iterate its contents as
|
/// Trait allowing to consume a struct and iterate its contents as
|
||||||
/// serialisable [`rxml::Event`] items.
|
/// 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: `<T as xso::IntoXml>::EventIter`.
|
||||||
pub trait IntoXml {
|
pub trait IntoXml {
|
||||||
/// The iterator type.
|
/// 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:
|
||||||
|
/// `<T as xso::IntoXml>::EventIter`.
|
||||||
type EventIter: Iterator<Item = Result<rxml::Event, self::error::Error>>;
|
type EventIter: Iterator<Item = Result<rxml::Event, self::error::Error>>;
|
||||||
|
|
||||||
/// Return an iterator which emits the contents of the struct or enum as
|
/// Return an iterator which emits the contents of the struct or enum as
|
||||||
|
|
Loading…
Reference in a new issue