dc76f296de
Prepare for merge: Move all xmpp-parsers files into xmpp-parsers/
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-10-18 13:47:10 +02:00
Emmanuel Gil Peyrot
d1d98ff3d5
Use crate::Element instead of minidom::Element.
...
This makes refactoring much easier.
2019-09-25 10:28:44 +02:00
Emmanuel Gil Peyrot
bc480f8e7c
Update test_size tests for 32-bit architectures
2019-06-12 13:53:18 +02:00
3178aaa1cb
Update test_size tests 64bit archs with jid-rs change
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-06-10 23:17:49 +02:00
1e3f940db9
Update jid dependency to 0.6.0: Jid split change
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-06-10 23:17:38 +02:00
Emmanuel Gil Peyrot
5bf14b0b22
Drop dependency on try_from.
...
This bumps the minimum supported stable Rust version to 1.34.
The TryFrom and TryInto traits are still reexported to not break the
API, but these reexports are deprecated and will be removed in a future
release.
2019-04-12 11:06:03 +02: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
409a1dafa9
Move Error, helpers and macros into a util module.
2019-01-13 12:39:51 +01:00
Emmanuel Gil Peyrot
2a7cf487a4
roster: Also test for the size of the new Ask attribute.
2019-01-13 12:07:11 +01:00
Emmanuel Gil Peyrot
b6796d54e6
roster: Simplify the @ask parsing using a singleton attribute.
2019-01-13 12:07:08 +01:00
linkmauve
69f77e9cf5
Merge branch 'fix-1-add-ask' into 'master'
...
Add ask attribute from RFC3921.
Closes #1
See merge request xmpp-rs/xmpp-parsers!4
2019-01-13 11:06:17 +00:00
Emmanuel Gil Peyrot
c2b7e19378
Rename "compat" into "disable-validation", to insist on it breaking some guarantees.
2019-01-12 22:00:46 +01:00
O01eg
5ebe92c260
Add ask attribute from RFC3921.
...
Fixes #1
2019-01-07 16:49:33 +03:00
Astro
95f4ade4ba
compat mode that relaxes some of the check_* macros
2018-12-30 00:36:29 +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
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
170f87ef0f
roster: Finish to document this module.
2018-07-31 23:47:55 +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
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
d9aaa3e9ce
macros: Remove use requirement on error::Error.
2018-05-14 16:21:39 +02:00
Emmanuel Gil Peyrot
6f497027f5
macros: Remove use requirement on minidom::Element.
2018-05-14 16:17:21 +02:00
Emmanuel Gil Peyrot
0d4327eb42
macros: Remove use requirement on minidom::IntoAttributeValue.
2018-05-14 16:12:56 +02:00
Emmanuel Gil Peyrot
040792c242
macros: Remove use requirement on std::str::FromStr.
2018-05-14 16:11:22 +02:00
Emmanuel Gil Peyrot
292cdd059c
macros: Remove use requirement on try_from::TryFrom.
2018-05-14 16:07:15 +02:00
Emmanuel Gil Peyrot
42a3e42533
roster: Simplify parsing of Item.
2017-11-24 05:09:25 +00:00
Emmanuel Gil Peyrot
cec581baa0
roster: Parse query using the new helpers.
2017-11-23 16:45:05 +00:00
Emmanuel Gil Peyrot
33018a5c09
roster: Make subscription="none" the default, see RFC6121 §2.1.2.5.
2017-10-10 17:40:29 +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
a04c395122
roster: Document most structs and their fields.
2017-07-29 06:22:35 +01:00
Emmanuel Gil Peyrot
6ec1e46953
roster: Make Group a proper struct.
2017-07-29 05:36:59 +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
5df585ca40
data_forms, ibr, message, presence, roster: Always use into_iter.
2017-07-20 23:09:22 +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
96fe2d200e
roster: Fix group serialisation and add a test.
2017-06-25 23:27:38 +01:00
Emmanuel Gil Peyrot
0f297d2d2d
Add a generate_attribute! macro, and use it for the common case.
2017-06-14 00:50:57 +01:00
Emmanuel Gil Peyrot
08ba164073
roster: Add a test for empty name == no name.
2017-05-29 03:42:11 +01:00
Emmanuel Gil Peyrot
7395e4b88f
roster: Make an empty name be None instead.
...
RFC 6121 §2.4.1:
“Implementation Note: Including an empty 'name' attribute is equivalent
to including no 'name' attribute; both actions set the name to the
empty string.”
2017-05-29 03:40:34 +01:00
Emmanuel Gil Peyrot
aae435c4d9
Add a roster parser/serialiser.
2017-05-28 16:30:43 +01:00