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
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
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
0da5639be5
jingle: Document this module.
2018-09-20 21:15:50 +02:00
Emmanuel Gil Peyrot
709666bb91
jingle: Document most of this module.
2018-09-20 20:28:50 +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
a625b88fce
macros: Merge all element children into a common syntax.
2018-05-28 16:29: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
f52c28fb35
jingle, jingle_s5b: Add missing checks for unknown attributes and children.
2018-05-15 01:47:12 +02:00
Emmanuel Gil Peyrot
93b018e5ac
macros: Remove use requirement on ns.
2018-05-14 16:30:28 +02:00
Emmanuel Gil Peyrot
0d4327eb42
macros: Remove use requirement on minidom::IntoAttributeValue.
2018-05-14 16:12:56 +02:00
Emmanuel Gil Peyrot
6bb466eea2
Use check_self!() where it makes sense.
2018-05-12 18:31:11 +02:00
Emmanuel Gil Peyrot
a1e95ffb2e
jingle: Add constructors and setters.
2018-05-04 19:10:29 +02:00
Emmanuel Gil Peyrot
7fa889f46e
jingle: Import the disposition attribute values.
2017-10-31 17:17:06 +00:00
Emmanuel Gil Peyrot
f69f567448
Use minidom 0.6.1’s Element::has_ns(), to simplify namespace comparisons.
2017-08-27 01:04:56 +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
f83fe92244
jingle: Wrap the disposition in a struct, to get better type safety.
2017-07-29 02:47:33 +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
161e5dcc9b
jingle: Type Content::name better.
2017-07-15 11:37:29 +01:00
Emmanuel Gil Peyrot
a219501fed
jingle, jingle_ft: Use the new generate_id! macro to simplify Sid/Cid generation.
2017-06-25 22:14:51 +01:00
Emmanuel Gil Peyrot
e7f0c45da5
jingle: Fix sid test.
2017-06-14 09:19:06 +01:00
Emmanuel Gil Peyrot
48d340120c
jingle: Specialise Sid to get an increased type safety.
2017-06-14 02:28:42 +01:00
Emmanuel Gil Peyrot
393402032c
jingle: Add a comment.
2017-06-14 00:59:37 +01:00
Emmanuel Gil Peyrot
ebc7582250
Move the Default implementation into more generate_attribute!.
2017-06-14 00:53:18 +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
764a7190e9
stanza_error: Simplify with IntoElements.
2017-05-25 01:14:36 +01:00
Emmanuel Gil Peyrot
17d6959606
jingle: Remove unused clones.
2017-05-24 23:38:44 +01:00
Emmanuel Gil Peyrot
00f3f3eee6
jingle: Simplify parsing and serialisation.
2017-05-24 22:28:54 +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
f99c667eab
jingle: Make description and transport optional in content.
2017-05-06 14:58:18 +01:00
Emmanuel Gil Peyrot
6c4fd8da01
jingle: Update to Into and TryFrom.
2017-05-04 01:20:28 +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
4fb4727357
jingle: Remove extraneous println!.
2017-04-28 23:45:43 +01:00
Emmanuel Gil Peyrot
10a336f874
jingle: Accept any unknown child, as per the specification.
2017-04-28 23:45:27 +01:00
Emmanuel Gil Peyrot
c20d37a842
jingle: Add serialisation for <reason/>.
2017-04-28 23:45:02 +01:00
Emmanuel Gil Peyrot
db1a87e2ee
jingle: Implement serialise.
2017-04-24 19:25:00 +01:00
Emmanuel Gil Peyrot
fa10ab4ebc
jingle: Implement From for String on all special attributes.
2017-04-24 19:25:00 +01:00
Emmanuel Gil Peyrot
90db24eed8
jingle: Simplify the FromStr using match.
2017-04-23 03:41:26 +01:00
Emmanuel Gil Peyrot
24d563ff18
jingle: Carry the minidom Element for description, transport and security.
2017-04-22 19:30:17 +01:00
Emmanuel Gil Peyrot
0778ceea7d
jingle: Remove extraneous println!().
2017-04-22 17:38:19 +01:00