Commit graph

33 commits

Author SHA1 Message Date
Emmanuel Gil Peyrot
b307652421 Remove unused base64 imports. 2019-09-07 16:21:42 +02:00
Emmanuel Gil Peyrot
1eb8c781ab hashes: Add a from_hex constructor, and use it in Sha1HexAttribute. 2019-07-30 22:14:06 +02:00
Emmanuel Gil Peyrot
72ebd21767 hashes: Add base64, hex and colon-separated hex formatters on Hash. 2019-07-25 17:51:05 +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
429fc387b5 jingle_drls_srtp: Add a new parser and serialiser. 2019-02-28 13:33:18 +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
82015de964 hashes: Add an hex-encoded SHA-1 attribute helper. 2019-01-25 03:03:08 +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
a61c32176f hashes: Document this module. 2018-08-08 19:02:03 +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
93b018e5ac macros: Remove use requirement on ns. 2018-05-14 16:30:28 +02:00
Emmanuel Gil Peyrot
6f497027f5 macros: Remove use requirement on minidom::Element. 2018-05-14 16:17:21 +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
c762a03c39 hashes: Add two constructors. 2018-05-04 19:10:04 +02:00
Emmanuel Gil Peyrot
3f57edfc27 hashes: Use the new helpers. 2017-11-23 15:52:06 +00: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
33994c1042 hashes: Implement Eq and Hash. 2017-05-29 05:14:49 +01:00
Emmanuel Gil Peyrot
42235c42fb hashes: Implement From<Hash> for String. 2017-05-27 12:22:11 +01:00
Emmanuel Gil Peyrot
a6b3152add hashes: Make the hash a Vec<u8>, to avoid base64 issues. 2017-05-25 00:30:29 +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
b22acff15e hashes, ecaps2, jingle_ft: Make the algorithm a proper enum. 2017-05-18 23:09:29 +01:00
Emmanuel Gil Peyrot
1ec3806629 hashes: Switch to Into/TryFrom. 2017-05-06 20:46:11 +01:00
Emmanuel Gil Peyrot
407e4cceb4 License the project under MPL-2.0. 2017-04-29 22:14:34 +01:00
Emmanuel Gil Peyrot
20949c2832 hashes: Implement serialise. 2017-04-23 18:36:12 +01:00
Emmanuel Gil Peyrot
edc5961a79 hashes: Implement PartialEq on Hash. 2017-04-22 17:38:36 +01:00
Emmanuel Gil Peyrot
ea2ff8a35d Add a hash parser. 2017-04-21 04:21:16 +01:00