xmpp-parsers: Stop reexporting extra symbols

Let’s continue reexporting jid and minidom, but not their inner pub
items, users of this crate can go one level deeper if they need that.

Only xso::error::Error is still useful to reexport, as this is part of
the public API of all of our parsers.
This commit is contained in:
Emmanuel Gil Peyrot 2024-07-24 20:28:22 +02:00 • committed by Jonas Schäfer
commit 7b66de1166
79 changed files with 123 additions and 118 deletions

View file

@ -9,8 +9,8 @@ use crate::date::DateTime;
use crate::message::MessagePayload;
use crate::ns;
use crate::pubsub::{Item as PubSubItem, ItemId, NodeName, Subscription, SubscriptionId};
use crate::Element;
use jid::Jid;
use minidom::Element;
use xso::error::{Error, FromElementError};
/// Event wrapper for a PubSub `<item/>`.

View file

@ -18,7 +18,8 @@ pub use self::event::PubSubEvent;
pub use self::owner::PubSubOwner;
pub use self::pubsub::PubSub;
use crate::{Element, Jid};
use jid::Jid;
use minidom::Element;
generate_id!(
/// The name of a PubSub node, used to identify it on a JID.
@ -105,4 +106,4 @@ impl Item {
}
/// This trait should be implemented on any element which can be included as a PubSub payload.
pub trait PubSubPayload: ::std::convert::TryFrom<crate::Element> + Into<crate::Element> {}
pub trait PubSubPayload: TryFrom<Element> + Into<Element> {}

View file

@ -11,8 +11,8 @@ use crate::data_forms::DataForm;
use crate::iq::{IqGetPayload, IqResultPayload, IqSetPayload};
use crate::ns;
use crate::pubsub::{AffiliationAttribute, NodeName, Subscription};
use crate::Element;
use jid::Jid;
use minidom::Element;
use xso::error::{Error, FromElementError};
generate_element!(

View file

@ -15,8 +15,8 @@ use crate::ns;
use crate::pubsub::{
AffiliationAttribute, Item as PubSubItem, NodeName, Subscription, SubscriptionId,
};
use crate::Element;
use jid::Jid;
use minidom::Element;
// TODO: a better solution would be to split this into a query and a result elements, like for
// XEP-0030.