Commit graph

35 commits

Author SHA1 Message Date
0138a62957 Add more helpers on Jid to convert to Bare/FullJid
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-09-08 23:25:06 +02:00
Emmanuel Gil Peyrot
1638288644 Reimplement std::error::Error for Error.
It was removed with the removal of failure, but like in minidom (#18) it
was probably used by people, so let’s reintroduce it.
2019-09-07 16:08:53 +02:00
e2f9bdbf1b Merge branch 'no-failure' into 'master'
Remove failure

See merge request xmpp-rs/jid-rs!19
2019-09-05 19:21:27 +00:00
Emmanuel Gil Peyrot
cba7a31ea0 Remove failure. 2019-09-05 19:46:13 +02:00
Randy von der Weide
56986a68e4 Impl Display for Jid 2019-08-31 13:17:51 +00:00
74759a7e39
Update minidom dep to 0.11
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-07-20 19:45:06 +02:00
750562cd96
add getters for node and domain on Jid
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-07-20 19:01:25 +02:00
lumi
8f0d5c7ca1 Implement From<BareJid> and From<FullJid> for Jid. 2019-07-06 14:55:19 +02:00
Emmanuel Gil Peyrot
20a7d4fc55 Switch from LGPLv3 to MPL-2.0. 2019-06-10 23:16:04 +02:00
Emmanuel Gil Peyrot
d7a74b2f28 Specify what is a bare and a full JID, and when to use something else. 2019-06-10 22:55:15 +02:00
Emmanuel Gil Peyrot
b12487a5b1 Standardise the casing of “full JID” and “bare JID”. 2019-06-10 22:54:52 +02:00
Emmanuel Gil Peyrot
6b1ad1ca9b Make the NoResource error description less ambiguous. 2019-06-10 22:49:57 +02:00
24aef813b3
rustfmt pass after split-jids merge
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-06-10 22:04:03 +02:00
395d448027
Split Jid struct into BareJid and FullJid. Jid is now an enum
This will help with being able to enforce the usage of bare or full at
compile time. It is still possible to allow one or the other with the
`Jid` enum.

Thanks to O01eg (from xmpp-rs@muc.linkmauve.fr) for the help. This
commit also contains code from them.

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-04-21 23:52:02 +01:00
Emmanuel Gil Peyrot
fa0894daa0 Run cargo fmt. 2018-12-18 16:40:44 +01:00
Emmanuel Gil Peyrot
316268d3a1 Use edition 2018. 2018-12-18 16:39:39 +01:00
Emmanuel Gil Peyrot
c45d1bf5ca simplify tests for invalid JIDs 2018-03-01 16:26:44 +01:00
Emmanuel Gil Peyrot
fd4a513779 implement Fail on JidParseError 2018-03-01 16:25:59 +01:00
Emmanuel Gil Peyrot
87d59181cb remove redundant test 2018-03-01 16:25:05 +01:00
Emmanuel Gil Peyrot
56b4657518 simplify Debug and Display implementations 2018-03-01 16:24:53 +01:00
Emmanuel Gil Peyrot
00f7d545aa add tests for errors 2018-02-18 21:36:36 +01:00
Emmanuel Gil Peyrot
2ffa3dc1d9 optionally implement minidom::IntoElements 2017-10-31 20:24:41 +00:00
Emmanuel Gil Peyrot
5bd0feb178 optionally implement minidom::IntoAttributeValue 2017-07-29 05:11:30 +01:00
Bastien Orivel
e00cfa2c2e Speedup jid parsing
name        control ns/iter  variable ns/iter  diff ns/iter   diff %  speedup
big_jids    638              456                       -182  -28.53%   x 1.40
small_jids  92               91                          -1   -1.09%   x 1.01
2017-06-12 23:11:37 +02:00
Maxime “pep” Buquet
2f59ca4b56 Fix doctests 2017-06-12 18:20:42 +01:00
Maxime “pep” Buquet
b69ecb31aa Renaming functions 2017-06-12 18:05:19 +01:00
Maxime “pep” Buquet
10ab104ea0 Better without clones 2017-06-12 17:46:06 +01:00
Maxime “pep” Buquet
072cba6a3e Add get_ functions that return new truncated structs from the current one 2017-06-12 17:41:07 +01:00
Emmanuel Gil Peyrot
4cca174f68 Implement the Hash trait on Jid. 2017-05-27 20:45:00 +01:00
Emmanuel Gil Peyrot
c13cebf025 Implement the Debug trait in a more user-friendly way. 2017-05-01 00:00:12 +01:00
Emmanuel Gil Peyrot
0288b937df Simplify the Display implementation. 2017-04-30 21:44:02 +01:00
Emmanuel Gil Peyrot
0d2fda8064 implement From<Jid> on String 2017-04-23 14:49:00 +01:00
lumi
5ae85aa884 add #![deny(missing_docs)] and documentation 2017-02-28 12:38:00 +01:00
lumi
19efcf3560 add license, prepare for release 2017-02-27 16:42:09 +01:00
lumi
4725e5f174 initial commit 2017-02-27 15:35:57 +01:00