parsers: replace generate_empty_element with derive

This commit is contained in:
Jonas Schäfer 2024-06-21 17:54:12 +02:00
commit bc785fde28
14 changed files with 122 additions and 150 deletions

View file

@ -3,15 +3,15 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
use xso::{FromXml, IntoXml};
use crate::message::MessagePayload;
use crate::ns;
generate_empty_element!(
/// Requests the attention of the recipient.
Attention,
"attention",
ATTENTION
);
/// Requests the attention of the recipient.
#[derive(FromXml, IntoXml, Debug, Clone, PartialEq)]
#[xml(namespace = ns::ATTENTION, name = "attention")]
pub struct Attention;
impl MessagePayload for Attention {}