Jonas Schäfer
6ef8dbefa3
parsers: use Error type from xso
...
This is a large change and as such, it needs good motivation. Let me
remind you of the ultimate goal: we want a derive macro which allows us
to FromXml/IntoXml, and that derive macro should be usable from
`xmpp_parsers` and other crates.
For that, any code generated by the derive macro mustn't depend on any
code in the `xmpp_parsers` crate, because you cannot name the crate you
are in portably (`xmpp_parsers::..` wouldn't resolve within
`xmpp_parsers`, and `crate::..` would point at other crates if the macro
was used in other crates).
We also want to interoperate with code already implementing
`TryFrom<Element>` and `Into<Element>` on structs. This ultimately
requires that we have an error type which is shared by the two
implementations and that error type must be declared in the `xso` crate
to be usable by the macros.
Thus, we port the error type over to use the type declared in `xso`.
This changes the structure of the error type greatly; I do not think
that `xso` should have to know about all the different types we are
parsing there and they don't deserve special treatment. Wrapping them in
a `Box<dyn ..>` seems more appropriate.
2024-06-23 09:40:52 +02:00
..
muc
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
pubsub
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
util
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
attention.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
avatar.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
bind.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
blocking.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
bob.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
bookmarks.rs
Improve documentation
2023-12-16 17:29:00 +01:00
bookmarks2.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
caps.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
carbons.rs
jid: rewrite public types
2024-04-15 18:21:24 +02:00
cert_management.rs
Refactored the "helpers" so that they use a common Codec trait; this makes them composable as well.
2024-01-10 19:49:53 +00:00
chatstates.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
component.rs
Refactored the "helpers" so that they use a common Codec trait; this makes them composable as well.
2024-01-10 19:49:53 +00:00
csi.rs
Update edition to 2021
2023-12-15 19:40:09 +00:00
data_forms.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
date.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
delay.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
disco.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
ecaps2.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
eme.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
extdisco.rs
Update size tests
2024-03-08 16:04:55 +01:00
forwarding.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
hashes.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
http_upload.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
ibb.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
ibr.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
idle.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
iq.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
jid_prep.rs
jid: rewrite public types
2024-04-15 18:21:24 +02:00
jingle.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
jingle_dtls_srtp.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
jingle_ft.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
jingle_grouping.rs
Update edition to 2021
2023-12-15 19:40:09 +00:00
jingle_ibb.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
jingle_ice_udp.rs
Fix size tests on latest Rust release
2024-02-27 12:27:31 +01:00
jingle_message.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
jingle_raw_udp.rs
Update edition to 2021
2023-12-15 19:40:09 +00:00
jingle_rtcp_fb.rs
Update edition to 2021
2023-12-15 19:40:09 +00:00
jingle_rtp.rs
Update edition to 2021
2023-12-15 19:40:09 +00:00
jingle_rtp_hdrext.rs
Update edition to 2021
2023-12-15 19:40:09 +00:00
jingle_s5b.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
jingle_ssma.rs
Update edition to 2021
2023-12-15 19:40:09 +00:00
jingle_thumnails.rs
Added jingle_thumbnails module.
2024-02-08 16:07:41 +00:00
legacy_omemo.rs
Refactored the "helpers" so that they use a common Codec trait; this makes them composable as well.
2024-01-10 19:49:53 +00:00
lib.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
mam.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
mam_prefs.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
media_element.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
message.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
message_correct.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
mix.rs
Update edition to 2021
2023-12-15 19:40:09 +00:00
mood.rs
Update edition to 2021
2023-12-15 19:40:09 +00:00
nick.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
ns.rs
Fix typos across the codebase (thanks codespell!)
2024-05-14 05:46:02 +00:00
occupant_id.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
oob.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
openpgp.rs
Refactored the "helpers" so that they use a common Codec trait; this makes them composable as well.
2024-01-10 19:49:53 +00:00
ping.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
presence.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
private.rs
Improve documentation
2023-12-16 17:29:00 +01:00
reactions.rs
Remove redundant imports
2024-02-27 22:57:18 +01:00
receipts.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
roster.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
rsm.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
rtt.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
sasl.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
server_info.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
sm.rs
Update edition to 2021
2023-12-15 19:40:09 +00:00
stanza_error.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
stanza_id.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
stream.rs
Update edition to 2021
2023-12-15 19:40:09 +00:00
time.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
tune.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
vcard.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00
vcard_update.rs
Fix last cargo doc warnings
2024-01-27 17:44:48 +00:00
version.rs
Update edition to 2021
2023-12-15 19:40:09 +00:00
websocket.rs
Update edition to 2021
2023-12-15 19:40:09 +00:00
xhtml.rs
parsers: use Error type from xso
2024-06-23 09:40:52 +02:00