parsers: port more generate_element! usages to derive macros

This commit is contained in:
Jonas Schäfer 2024-06-26 16:07:06 +02:00
commit e439e9991e
6 changed files with 79 additions and 68 deletions

View file

@ -203,15 +203,14 @@ impl Mix {
}
}
generate_element!(
/// Create a new MIX channel.
#[derive(Default)]
Create, "create", MIX_CORE,
attributes: [
/// The requested channel identifier.
channel: Option<ChannelId> = "channel",
]
);
/// Create a new MIX channel.
#[derive(FromXml, IntoXml, PartialEq, Clone, Debug, Default)]
#[xml(namespace = ns::MIX_CORE, name = "create")]
pub struct Create {
/// The requested channel identifier.
#[xml(attribute(default))]
pub channel: Option<ChannelId>,
}
impl IqSetPayload for Create {}
impl IqResultPayload for Create {}