parsers: port more generate_element! usages to derive macros
This commit is contained in:
parent
4e9c4883a3
commit
cea246a0fc
13 changed files with 200 additions and 151 deletions
|
|
@ -9,14 +9,14 @@ use xso::{FromXml, IntoXml};
|
|||
use crate::ns;
|
||||
use crate::stanza_error::DefinedCondition;
|
||||
|
||||
generate_element!(
|
||||
/// Acknowledgement of the currently received stanzas.
|
||||
A, "a", SM,
|
||||
attributes: [
|
||||
/// The last handled stanza.
|
||||
h: Required<u32> = "h",
|
||||
]
|
||||
);
|
||||
/// Acknowledgement of the currently received stanzas.
|
||||
#[derive(FromXml, IntoXml, PartialEq, Debug, Clone)]
|
||||
#[xml(namespace = ns::SM, name = "a")]
|
||||
pub struct A {
|
||||
/// The last handled stanza.
|
||||
#[xml(attribute)]
|
||||
pub h: u32,
|
||||
}
|
||||
|
||||
impl A {
|
||||
/// Generates a new `<a/>` element.
|
||||
|
|
|
|||
Loading…
Reference in a new issue