Jonas Platte
82b7cc1637
identifiers: Add as_bytes to all types with as_str
2020-07-26 14:55:39 +02:00
Jonas Platte
2e5fceb2b5
identifiers: Simplify generated as_str implementations
2020-07-26 14:44:37 +02:00
Jonas Platte
8faeef4fef
identifiers: Remove outdated allow attribute
2020-07-24 21:15:24 +02:00
Jonas Platte
617a40e3e9
identifiers: Change deny attribute to warn
2020-07-24 21:15:04 +02:00
Jonas Platte
85e2ae3d48
Remove ugly commas
2020-07-24 21:13:41 +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
885aae39c5
Add From<&T> for Box<T> implementations for ServerName, DeviceId
2020-07-22 20:22:17 +02:00
Jonas Platte
4cbdc079b0
Improve string comparison impls
2020-07-22 19:17:24 +02:00
Jonas Platte
b24df92692
Make DeviceId a newtype rather than an alias
2020-07-22 18:59:33 +02:00
Jonas Platte
8d8e18afbc
Make RoomVersionId a non-exhaustive enum
2020-07-22 18:38:37 +02:00
Jonas Platte
c2ea1493cb
identifiers: Use .as_ref()
less
2020-07-20 16:33:29 +02:00
Isaiah Inuwa
ade43c8516
Use ServerName everywhere
2020-07-18 07:50:53 -05: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
501652a272
Fix unused import warnings
2020-07-15 15:49:04 +02:00
Jonas Platte
60238bbb85
Fix doc_concat macro on older versions of rustc
2020-07-15 02:02:14 +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
75ea42961f
Use strum(serialize_all) instead of strum(to_string)
2020-06-23 12:52:21 +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
46c4f12404
identifiers: Move is_valid_server_name logic to server_name::try_from
2020-06-21 18:47:59 +02:00
Jonas Platte
046668466c
identifiers: Add more conversion functions
2020-06-18 12:11:52 +02:00
iinuwa
f8492db766
Add ServerName identifier
2020-06-18 11:21:00 +02:00
Jonas Platte
c20d52e2af
identifiers: Update DeviceKeyId::device_id
to return a reference instead of cloning
2020-06-17 12:15:38 +02:00
stoically
d59a616e2c
federation-api: Add query server key discovery endpoints
2020-06-08 21:18:58 +02:00
Isaiah Inuwa
baa8710456
Re-export key identifiers at crate root
2020-06-07 13:52:27 -05:00
Jonas Platte
b1193a2883
identifiers: Add DeviceId, DeviceIdRef to the crate root
2020-06-07 17:22:44 +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