Emmanuel Gil Peyrot
f0f4299b02
xmpp-parsers: Parse the bind feature in its module, with required
...
This is different from the bind query or the bind response, despite all
three having the same element namespace and name… Annoying!
2024-08-06 16:14:42 +02:00
Emmanuel Gil Peyrot
35932268af
tokio-xmpp: Error out when the stream:features couldn’t be parsed
...
This is nicer than sleeping forever with no debug info whatsoever.
2024-08-06 16:14:42 +02:00
xmppftw
ba6a7c4744
Use tokio::sync::RwLock instead of std
2024-08-06 16:04:04 +02:00
xmppftw
8aca413fc3
Collect unknown stream features in StreamFeatures.others
2024-08-05 21:38:29 +02:00
Jonas Schäfer
fda4a9ff29
xso: implement transparent structs
2024-08-05 15:13:39 +00:00
Emmanuel Gil Peyrot
fea915daf1
xmpp-parsers: Make MAM metadata children pub
...
This had been forgotten when I converted it to xso.
2024-08-05 15:02:25 +00:00
Emmanuel Gil Peyrot
e1da3410ba
xmpp-parsers: Convert MAM prefs to xso
2024-08-05 15:02:25 +00:00
Emmanuel Gil Peyrot
0d3e73ec74
xmpp-parsers: Convert bind2 to xso
2024-08-05 15:02:25 +00:00
Emmanuel Gil Peyrot
f37b7b4dfd
xmpp-parsers: Convert bind to xso
2024-08-05 15:02:25 +00:00
Emmanuel Gil Peyrot
2df243966f
xmpp-parsers: Convert blocking to xso
2024-08-05 15:02:25 +00:00
Emmanuel Gil Peyrot
ce0f3bec0e
xmpp-parsers: Convert DataForms validation to xso
2024-08-05 15:02:25 +00:00
Emmanuel Gil Peyrot
95d08e3c1e
xmpp-parsers: Simplify RTT implementation using more xso
...
Especially exhaustive enums are super useful for this kind of pattern.
2024-08-05 15:02:25 +00:00
Emmanuel Gil Peyrot
f049e3626b
xmpp-parsers: Convert OOB to xso
2024-08-05 15:02:25 +00:00
Emmanuel Gil Peyrot
79e224a02a
xmpp-parsers: Convert bookmarks to xso
2024-08-05 15:02:25 +00:00
Emmanuel Gil Peyrot
9e9186ef7b
xmpp-parsers: Convert MUC to xso
2024-08-05 15:02:25 +00:00
Emmanuel Gil Peyrot
57c2eeadfc
xmpp-parsers: Convert Jingle RTP to xso
2024-08-05 15:02:25 +00:00
Emmanuel Gil Peyrot
4e2af36186
xmpp-parsers: Implement FromXmlText and AsXmlText for default types
...
This allows such default type wrappers to be used in other xso elements.
2024-08-05 15:02:25 +00:00
Jonas Schäfer
656125a850
xso-proc: change field def's span slightly for better UX
2024-08-05 15:33:57 +02:00
Jonas Schäfer
0361b5905b
xso: implement catch-all for unknown elements
2024-08-05 15:33:57 +02:00
xmppftw
2103ef0191
Remove manual doc_cfg feature because we have doc_auto_cfg
2024-08-05 11:14:41 +02:00
xmppftw
fa99c09585
Indicate which feature flag for each module/type
2024-08-05 11:14:41 +02:00
xmppftw
aa26d98e2a
Check attr="" parse to Some("") in Option<String>
2024-08-05 05:49:14 +00:00
xmppftw
b3fd0b5372
Move SimpleClient constructors to client::simple_client module
2024-08-04 21:32:38 +02:00
xmppftw
fc0071a0c5
Move AsyncClient::new to client::async_client module
2024-08-04 21:32:36 +02:00
xmppftw
84511b54a0
Only expose one error type in crate root
2024-08-04 18:17:17 +02:00
xmppftw
34796c90d4
Only expose one error type in crate root
2024-08-04 16:04:09 +00:00
Jonas Schäfer
2358c8636e
xso-proc: refactor field implementations into separate files
...
This decreases indentation levels on the various implemenations, it
groups the implementations together physically, and (spoiler alert!)
we'll actually need the dyn Field trait object-ness (much) later on.
2024-08-04 16:14:47 +02:00
Jonas Schäfer
19be14cdd8
xso-proc: make field into a module folder
...
This is in prepraration of more refactoring to come, in order to make
the individual field implementations easier to grok and look at.
2024-08-04 16:11:31 +02:00
Jonas Schäfer
b0996e3a35
xso-proc: pull out the extract code into a separate impl
...
This should make everything a little easier to read, because it reduces
the level of indentation involved.
2024-08-04 16:11:19 +02:00
Jonas Schäfer
f466b18622
parsers: port version to derive macros
...
We can *finally* do it!
2024-08-04 16:07:14 +02:00
Jonas Schäfer
c7c180feb6
xso: implement support for defaulting extracts
2024-08-04 16:07:14 +02:00
Emmanuel Gil Peyrot
f318dd460d
xso: Use core instead of std wherever possible
2024-08-04 12:41:17 +00:00
Emmanuel Gil Peyrot
1828fde78c
xso-proc: Use core instead of std wherever possible
2024-08-04 12:41:17 +00:00
xmppftw
5de1891f06
Merged starttls::ConnectorError into starttls::Error
2024-08-04 12:39:56 +00:00
Emmanuel Gil Peyrot
aa518fd6c1
xso-proc: add support for extracting attributes into collections
2024-08-04 13:38:52 +02:00
Jonas Schäfer
8732ca9a28
xso: add support for extracting into collections
2024-08-03 18:19:31 +02:00
Jonas Schäfer
5590d707fb
xso-proc: merge extract and normal child code
2024-08-03 18:10:11 +02:00
Emmanuel Gil Peyrot
7ab375fad7
xmpp-parsers: Convert ext disco and Jingle ICE-UDP to xso
2024-08-03 15:48:50 +02:00
Jonas Schäfer
df63c2a78f
xso: allow omission of namespace and name on extracts
...
This is a quality-of-life improvement, as it may save lots of typing in
the common case (see the diff in parsers).
2024-08-03 15:25:46 +02:00
Emmanuel Gil Peyrot
48855843d4
xmpp-parsers: Convert some more elements to xso
2024-08-03 13:21:51 +00:00
Jonas Schäfer
1e0bccc504
parsers: port extracts over to derive macros
2024-08-03 15:17:30 +02:00
Jonas Schäfer
2c5f1f096b
xso: implement support for extracting data from child elements
2024-08-03 15:17:30 +02:00
Jonas Schäfer
5efaabc74b
xso-proc: allow constructing a Compound from processed fields
...
This will come in handy when we implement the ability to extract
data from nested children.
2024-08-03 15:17:30 +02:00
Jonas Schäfer
e0de035448
xso-proc: deduplicate parsing of namespace
/ name
keys
2024-08-03 15:17:30 +02:00
Jonas Schäfer
6440209f95
xso: reject duplicate children
...
This was an oversight. Even though we apparently don't have tests for
this anywhere, it is what the old functional macros do.
2024-08-03 11:58:19 +00:00
Emmanuel Gil Peyrot
7f5b6fec7f
xso: Allow any T: FromXmlText + AsXmlText in EmptyAsNone
...
This text codec was previously implemented only for Option<String>, this
extends it to all types implementing those two traits, such as numbers
or JIDs.
2024-08-03 13:43:44 +02:00
Jonas Schäfer
2b346c4e87
parsers: port more things to derive macros
2024-08-03 13:05:37 +02:00
Jonas Schäfer
93ba2797be
xso-proc: implement support for collections of children
2024-08-03 12:20:04 +02:00
Jonas Schäfer
5c3ed1435f
parsers: delete now-unused generate_element_enum macro
2024-08-03 12:19:42 +02:00
Jonas Schäfer
6afd0ef52f
parsers: port enums over to derive macros
2024-08-03 12:19:42 +02:00