Port everything over to AsXml

This commit is contained in:
Jonas Schäfer 2024-07-09 17:01:42 +02:00
commit ccf38cdf9b
64 changed files with 848 additions and 371 deletions

View file

@ -4,7 +4,7 @@
// 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 xso::{AsXml, FromXml};
use crate::forwarding::Forwarded;
use crate::iq::IqSetPayload;
@ -12,14 +12,14 @@ use crate::message::MessagePayload;
use crate::ns;
/// Enable carbons for this session.
#[derive(FromXml, IntoXml, PartialEq, Debug, Clone)]
#[derive(FromXml, AsXml, PartialEq, Debug, Clone)]
#[xml(namespace = ns::CARBONS, name = "enable")]
pub struct Enable;
impl IqSetPayload for Enable {}
/// Disable a previously-enabled carbons.
#[derive(FromXml, IntoXml, PartialEq, Debug, Clone)]
#[derive(FromXml, AsXml, PartialEq, Debug, Clone)]
#[xml(namespace = ns::CARBONS, name = "disable")]
pub struct Disable;
@ -27,7 +27,7 @@ impl IqSetPayload for Disable {}
/// Request the enclosing message to not be copied to other carbons-enabled
/// resources of the user.
#[derive(FromXml, IntoXml, PartialEq, Debug, Clone)]
#[derive(FromXml, AsXml, PartialEq, Debug, Clone)]
#[xml(namespace = ns::CARBONS, name = "private")]
pub struct Private;