Emmanuel Gil Peyrot
ae3a5b6725
macros: Remove backwards-compatibility variants introduced in the previous commit.
2019-02-24 20:48:19 +01:00
Emmanuel Gil Peyrot
bcd42a26e3
macros: Use a nicer syntax when declaring attributes.
...
The previous version had a => required|optional|default token, this was
duplicating information for Option types and didn’t look very good.
This new version looks like a type, which can be either Required<_>,
Option<_> or Default<_>, and means the same thing.
2019-02-24 20:26:42 +01:00
Emmanuel Gil Peyrot
637c3eadd7
Fix clippy lints.
2019-02-21 21:00:58 +01:00
Emmanuel Gil Peyrot
ede2b08039
disco: Add a helper constructor for Feature.
2019-01-27 17:18:58 +01:00
Emmanuel Gil Peyrot
409a1dafa9
Move Error, helpers and macros into a util module.
2019-01-13 12:39:51 +01:00
Emmanuel Gil Peyrot
efd7bd5f2f
Run cargo fmt
.
2018-12-18 15:32:05 +01:00
Emmanuel Gil Peyrot
6b2dd8fe5e
Run cargo fix --edition
to move to Edition 2018.
2018-12-18 15:27:30 +01:00
Emmanuel Gil Peyrot
e2c0068af9
disco: Remove errors for out-of-order elements, allowed in XEP-0030 2.5rc3.
2018-11-02 16:27:51 +01:00
Emmanuel Gil Peyrot
7a2dcbee01
Test struct sizes on 32-bit too.
2018-10-28 13:10:48 +01:00
Emmanuel Gil Peyrot
40aedcf184
Test the size of every struct defined here.
2018-10-26 14:26:16 +02:00
Emmanuel Gil Peyrot
7f12d05fd2
Switch allow→deny(missing_docs) for the whole crate.
2018-08-08 18:48:05 +02:00
Emmanuel Gil Peyrot
3fb99988d5
macros: Merge generate_element_with_children!() into generate_element!().
2018-05-28 16:45:13 +02:00
Emmanuel Gil Peyrot
9c598fbdf9
macros: Rename generate_element_with_only_attributes!() into generate_element!().
2018-05-28 16:42:35 +02:00
Emmanuel Gil Peyrot
9bd6fe002d
disco: Implement IqGetPayload on the correct structs.
2018-05-17 19:24:51 +02:00
Emmanuel Gil Peyrot
412eafb363
iq: Implement the Iq*Payload traits on every possible payload.
2018-05-16 15:08:17 +02:00
Emmanuel Gil Peyrot
93b018e5ac
macros: Remove use requirement on ns.
2018-05-14 16:30:28 +02:00
Emmanuel Gil Peyrot
0ead24a041
helpers, disco: Parse children based on their name and namespace.
2017-11-23 16:32:18 +00:00
Emmanuel Gil Peyrot
d78a0e6dae
helpers, disco: Add missing serialisation, and add a test.
2017-11-23 16:30:53 +00:00
Rust Cambridge Mob
3e37beffe2
Implement macro for elements containing children
2017-11-16 21:00:01 +00:00
Emmanuel Gil Peyrot
649286d59e
disco: Use generate_element_with_only_attributes.
2017-10-31 18:49:22 +00:00
Emmanuel Gil Peyrot
1892e1ca04
disco: Check for children ordering in disco#info.
2017-10-29 00:36:36 +01:00
Emmanuel Gil Peyrot
5f6f6a5e91
disco: Use the new helper macros to simplify parsing.
2017-10-10 19:00:42 +01:00
Astro
1b1661fd82
Introduce comparing with namespace support.
2017-08-19 00:04:18 +01:00
Emmanuel Gil Peyrot
99b9525e6f
Update to jid-rs 0.2.3, which implements IntoAttributeValue on Jid.
2017-07-29 06:28:20 +01:00
Emmanuel Gil Peyrot
45d196463c
disco: Document every struct and their fields.
2017-07-29 04:51:51 +01:00
Emmanuel Gil Peyrot
67e72b009e
disco: Fix serialisation of extensions, and add a test.
2017-07-29 04:39:50 +01:00
Emmanuel Gil Peyrot
4d3717d170
disco: Split Feature and Identity parsing out of DiscoQueryResult.
2017-07-29 04:35:15 +01:00
Emmanuel Gil Peyrot
5ece20a029
disco: Create a mutable DiscoInfoResult at the beginning of its parsing.
2017-07-29 04:25:55 +01:00
Emmanuel Gil Peyrot
4454da15b6
disco: Implement disco#items.
2017-07-21 17:33:58 +01:00
Emmanuel Gil Peyrot
3b6733f38b
Upgrade to minidom 0.4.4 to avoid having to redefine IntoElements for each Into<Element>.
2017-07-21 01:20:29 +01:00
Emmanuel Gil Peyrot
487dbdc6de
Replace Into<Element> with From<…> for Element.
...
This allows Element::from() to work, and since Into<Element> is
automatically implemented for any type implementing From there is no
change to existing code.
2017-07-20 20:36:13 +01:00
Emmanuel Gil Peyrot
1f43cd934b
Use TryFrom from the try_from crate, instead of the unstable feature.
...
This makes xmpp-parsers usable on stable.
2017-07-20 20:03:15 +01:00
Emmanuel Gil Peyrot
76a46559b8
disco: Split query and result.
2017-07-20 17:39:59 +01:00
Emmanuel Gil Peyrot
8e1d5e7983
disco: Make xml:lang a proper Option and rename it to lang.
2017-05-27 22:10:00 +01:00
Emmanuel Gil Peyrot
898baddd3f
disco: Split Into<Element> for Identity and Feature.
2017-05-24 23:47:27 +01:00
Emmanuel Gil Peyrot
16e43c0b01
Convert all of the parsers/serialisers into consuming their parameter.
2017-05-23 23:31:33 +01:00
Emmanuel Gil Peyrot
d61d09f5b7
hashes, presence, message, iq, disco: Use get_attr!.
2017-05-22 19:00:04 +01:00
Emmanuel Gil Peyrot
2b49d8aa53
disco: Switch to Into/TryFrom.
2017-05-06 21:01:15 +01:00
Emmanuel Gil Peyrot
8673b8f90e
data_forms: Switch to Into/TryFrom.
2017-05-06 20:51:39 +01:00
Emmanuel Gil Peyrot
4b90c1dc1f
data_forms, disco, jingle, jingle_ft: Remove superfluous “extern crate”.
2017-04-29 22:10:38 +01:00
Emmanuel Gil Peyrot
407e4cceb4
License the project under MPL-2.0.
2017-04-29 22:14:34 +01:00
Emmanuel Gil Peyrot
5d51dff9e6
disco: Bump minidom dependency to 0.2.0, which fixes xml:lang parsing.
2017-04-26 00:22:40 +01:00
Emmanuel Gil Peyrot
3209b04a50
Fix all warnings issued by cargo clippy
.
2017-04-21 01:28:58 +01:00
Emmanuel Gil Peyrot
62d9385728
Make all parsed types implement Clone.
2017-04-21 00:41:15 +01:00
Emmanuel Gil Peyrot
7288c2c74f
Import ns itself, and remove the _NS suffix on all namespaces.
2017-04-20 23:16:12 +01:00
Emmanuel Gil Peyrot
83cf57abd0
disco: Use a reference everywhere, instead of taking ownership.
2017-04-20 21:53:46 +01:00
Emmanuel Gil Peyrot
1190dd9001
disco: Add a serializer.
2017-04-20 21:03:02 +01:00
Emmanuel Gil Peyrot
e0e6119e55
disco: Relax the parsing rules for get disco#info.
2017-04-20 21:02:51 +01:00
Emmanuel Gil Peyrot
b8b0494c19
Fix a stupid copy/paste syntax error.
2017-04-20 00:14:29 +01:00
Emmanuel Gil Peyrot
fc7a0517d3
Replace assert!()s with proper errors in parsers.
2017-04-19 23:41:54 +01:00