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

@ -5,14 +5,14 @@
// 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::date::DateTime;
use crate::ns;
use crate::presence::PresencePayload;
/// Represents the query for messages before our join.
#[derive(FromXml, IntoXml, PartialEq, Debug, Clone, Default)]
#[derive(FromXml, AsXml, PartialEq, Debug, Clone, Default)]
#[xml(namespace = ns::MUC, name = "history")]
pub struct History {
/// How many characters of history to send, in XML characters.

View file

@ -7,7 +7,7 @@
use xso::{
error::{Error, FromElementError},
FromXml, IntoXml,
AsXml, FromXml,
};
use crate::message::MessagePayload;
@ -131,7 +131,7 @@ impl From<Actor> for Element {
/// Used to continue a one-to-one discussion in a room, with more than one
/// participant.
#[derive(FromXml, IntoXml, PartialEq, Debug, Clone)]
#[derive(FromXml, AsXml, PartialEq, Debug, Clone)]
#[xml(namespace = ns::MUC_USER, name = "continue")]
pub struct Continue {
/// The thread to continue in this room.