Jonas Platte
b4da6b784a
Replace non-renaming uses of serde_json::{from_str, to_string}
2021-04-05 13:33:59 +02:00
Jonas Platte
520bab2900
identifiers: Clean up dependencies
...
* Get rid of strum, now all crypto algorithms use ruma-serde's string / enum
conversion code
* Make the dependency on ruma-serde optional and only activate it through the
serde feature
2020-12-24 02:14:26 +01:00
Jonas Platte
5562a23aaa
Move Raw, Outgoing and all macro code from ruma-common to ruma-serde
2020-11-28 03:45:39 +01:00
Jonas Platte
70a12864ef
Use new macros for existing future-compatible enums
2020-11-02 00:29:41 +01:00
Jonas Platte
64b9c646d1
identifiers: Revert serde rename from Cargo.toml
2020-10-24 19:27:50 +02:00
Jonas Platte
c6d293e0e0
Drop #[non_exhaustive] attribute on RoomVersionId
...
With the _Custom variant being hidden, there is no point in additionally
making it non-exhaustive.
2020-09-22 01:15:38 +02:00
Jonas Platte
a01459e12b
identifiers: Hide RoomVersionId::Custom and CustomRoomVersion
2020-09-22 01:09:18 +02:00
Jonas Platte
91994015d2
identifiers: Remove RoomVersionId::{is_custom, is_official}
...
They were a forwards-compatibility hazard.
2020-09-22 01:03:30 +02:00
Jonas Platte
f0df31d42b
identifiers: Remove deprecated functions
2020-09-22 00:57:33 +02:00
Jonas Platte
22ec1710b5
Update ruma-identifiers validation logic
...
* Allow empty localparts
* Simplify some code
2020-09-21 22:34:56 +02:00
Jonas Platte
3454a0e750
Implement FromStr for identifier types
2020-08-11 02:15:14 +02:00
q-b
a1426c9308
Clean up room version id tests
2020-08-10 20:44:02 +02:00
Jonas Platte
0f3478bf90
Rename serde dependency in ruma-identifiers
...
to be able to make the serde feature activate
ruma-identifiers-validation's serde feature
2020-08-08 18:16:31 +02:00
Faelar
5153279eba
Fix missing RoomVersionId::Version6 try_from and tests
2020-08-07 18:06:44 +02:00
Jonas Platte
1881e45eee
Move ruma-identifiers validation logic into a new crate
2020-08-04 23:23:39 +02:00
Jonas Platte
82b7cc1637
identifiers: Add as_bytes to all types with as_str
2020-07-26 14:55:39 +02:00
Devin Ragotzy
4be63127f7
Add into_full_event and From<> impls to convert between sync and full events
2020-07-24 14:45:38 +02:00
Devin R
3329dc7345
Fix clippy warnings in identifiers and events-macros
2020-07-23 15:01:12 +02:00
Jonas Platte
05a99a00a0
Only use matches crate as a dev-dependency
2020-07-22 23:06:35 +02:00
Jonas Platte
09f711b1c3
Fix unused import
2020-07-22 22:46:27 +02:00
Jonas Platte
4cbdc079b0
Improve string comparison impls
2020-07-22 19:17:24 +02:00
Jonas Platte
8d8e18afbc
Make RoomVersionId a non-exhaustive enum
2020-07-22 18:38:37 +02:00
Jonas Platte
d6dfed568f
Add documentation to RoomVersionId's PartialOrd, Ord impls
2020-07-17 01:07:16 +02:00
Jonas Platte
7cfec8631a
Use the matches! macro in more places
2020-07-15 15:51:09 +02:00
Jonas Platte
a3e5d679a1
Revert making identifier types generic over the underlying string type
...
At the same time, this commit makes `ServerName` a newtype around str so
other identifier types can borrow out their server name part as a
`&ServerName`. This technique works for `ServerName` because it keeps no
additional metadata. For the other identifier types to support being
created in borrowed form from a string slice, custom DSTs first have to
be added to Rust.
2020-07-14 23:02:51 +02:00
Jonas Platte
c5db6d56ad
Remove RoomVersionId::custom constructor
...
It could be used to create invalid room versions like an empty one or
one with more than 32 code points.
2020-06-23 12:40:01 +02:00
Jonas Platte
abf8eafe0e
Rerun cargo fmt
2020-06-07 17:22:20 +02:00
Jonas Platte
83de77f002
Add 'ruma-identifiers/' from commit 'c0a1d8bd440c7cde0fa4ab5e22898ddb26bb706d'
...
git-subtree-dir: ruma-identifiers
git-subtree-mainline: 19ce9645b6651e4de42ddf9e81ee50e19c8c0f26
git-subtree-split: c0a1d8bd440c7cde0fa4ab5e22898ddb26bb706d
2020-06-07 17:06:45 +02:00