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
7a204cd182
Also test the size of IBB StreamId.
2018-12-18 15:44:07 +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
36cfe76e4d
macros: Merge generate_element_with_text!() into generate_element!().
2018-08-02 19:07:07 +02:00
Emmanuel Gil Peyrot
5f2062483a
ibb: Add documentation.
2018-07-02 13:47:32 +02:00
Emmanuel Gil Peyrot
75d5bd3665
ibb, jingle_ibb: Share StreamId.
2018-07-02 13:16:00 +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
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
ad17c877f5
Move Base64 codec into a helper module.
2017-11-23 16:00:47 +00:00
Rust Cambridge Mob
77e150c63d
Implement macro for elements containing text
2017-11-16 20:17:11 +00:00
Emmanuel Gil Peyrot
929bd577f3
Add a generate_element_with_only_attributes macro, and use it wherever it makes sense.
2017-10-31 17:58:11 +00:00
Emmanuel Gil Peyrot
db35d28c9c
ibb: Split the stupid enum into three different structs.
2017-07-29 03:44:35 +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
216f6f8389
Fix build and compilation.
2017-06-14 01:57:02 +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
6794b34714
Cargo.toml: Update minidom to 0.4.3 to use its new IntoAttributeValue implementation on numbers.
2017-05-27 23:18:15 +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
a4f50f2d43
jingle_ibb, ibb, rsm: Simplify attribute parsing.
2017-05-21 16:08:25 +01:00
Emmanuel Gil Peyrot
3c083709cb
rsm, ibb: Write and use a macro to parse attributes.
2017-05-21 16:03:17 +01:00
Emmanuel Gil Peyrot
e3acb55b49
ibb: Port to TryFrom/Into.
2017-05-04 23:11:10 +01:00
Emmanuel Gil Peyrot
407e4cceb4
License the project under MPL-2.0.
2017-04-29 22:14:34 +01:00
Emmanuel Gil Peyrot
846148d618
ibb: Fix serialisation of <data/> data.
2017-04-28 23:46:32 +01:00
Emmanuel Gil Peyrot
30a596cb26
ibb: Implement serialise.
2017-04-27 19:05:51 +01:00
Emmanuel Gil Peyrot
c71b32ae24
ibb: Implement IntoAttributeValue for Stanza.
2017-04-24 19:25:00 +01:00
Emmanuel Gil Peyrot
16a6ebd751
ibb: Simplify the FromStr using match.
2017-04-23 03:44:58 +01:00
Emmanuel Gil Peyrot
22ec4b1913
ibb: Improve handling of optional stanza attribute.
2017-04-22 19:15:29 +01:00
Emmanuel Gil Peyrot
94380fdbd5
ibb: Add some more tests.
2017-04-21 03:21:06 +01:00
Emmanuel Gil Peyrot
189f17c569
ibb: Add a parser for the <close/> element.
2017-04-21 03:09:10 +01:00
Emmanuel Gil Peyrot
fb373c2b66
ibb: Add a parser for the <data/> element.
2017-04-21 03:07:21 +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
fc7a0517d3
Replace assert!()s with proper errors in parsers.
2017-04-19 23:41:54 +01:00
Emmanuel Gil Peyrot
4f31727a1a
Add an In-Band Bytestream parser.
2017-04-19 21:52:14 +01:00