parsers: derive PartialEq on Iq too
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
8d9288ffd7
commit
e8a7d909c1
2 changed files with 3 additions and 3 deletions
|
@ -23,7 +23,7 @@ pub trait IqSetPayload: TryFrom<Element> + Into<Element> {}
|
||||||
pub trait IqResultPayload: TryFrom<Element> + Into<Element> {}
|
pub trait IqResultPayload: TryFrom<Element> + Into<Element> {}
|
||||||
|
|
||||||
/// Represents one of the four possible iq types.
|
/// Represents one of the four possible iq types.
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone, PartialEq)]
|
||||||
pub enum IqType {
|
pub enum IqType {
|
||||||
/// This is a request for accessing some data.
|
/// This is a request for accessing some data.
|
||||||
Get(Element),
|
Get(Element),
|
||||||
|
@ -53,7 +53,7 @@ impl<'a> IntoAttributeValue for &'a IqType {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The main structure representing the `<iq/>` stanza.
|
/// The main structure representing the `<iq/>` stanza.
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone, PartialEq)]
|
||||||
pub struct Iq {
|
pub struct Iq {
|
||||||
/// The JID emitting this stanza.
|
/// The JID emitting this stanza.
|
||||||
pub from: Option<Jid>,
|
pub from: Option<Jid>,
|
||||||
|
|
|
@ -194,7 +194,7 @@ generate_element_enum!(
|
||||||
type Lang = String;
|
type Lang = String;
|
||||||
|
|
||||||
/// The representation of a stanza error.
|
/// The representation of a stanza error.
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone, PartialEq)]
|
||||||
pub struct StanzaError {
|
pub struct StanzaError {
|
||||||
/// The type of this error.
|
/// The type of this error.
|
||||||
pub type_: ErrorType,
|
pub type_: ErrorType,
|
||||||
|
|
Loading…
Reference in a new issue