parsers: replace generate_empty_element with derive
This commit is contained in:
parent
0adfd1218b
commit
bc785fde28
14 changed files with 122 additions and 150 deletions
|
|
@ -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 {}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue