12 Commits

Author SHA1 Message Date
Jonas Platte
a842c5ccdc
identifiers: Add DeviceIdBox and ServerNameBox 2020-08-13 20:42:03 +02:00
Jonas Platte
3454a0e750
Implement FromStr for identifier types 2020-08-11 02:15:14 +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
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
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
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
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
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