Refactored the "helpers" so that they use a common Codec trait; this makes them composable as well.

This commit is contained in:
Werner Kroneman 2024-01-06 19:14:37 +01:00 committed by Link Mauve
commit 18cb6f6e2d
19 changed files with 285 additions and 222 deletions

View file

@ -7,7 +7,7 @@
use crate::date::DateTime;
use crate::message::MessagePayload;
use crate::presence::PresencePayload;
use crate::util::helpers::PlainText;
use crate::util::text_node_codecs::{Codec, OptionalCodec, Text};
use jid::Jid;
generate_element!(
@ -22,7 +22,7 @@ generate_element!(
],
text: (
/// The optional reason this message got delayed.
data: PlainText<Option<String>>
data: OptionalCodec<Text>
)
);