Jonas Platte
7a70d96235
Remove PrivOwnedStr() from Debug formatting
2022-02-15 17:46:27 +01:00
Jonas Platte
ebb09589f9
Remove authors field from Cargo manifests
...
It's no longer necessary and authorship is much better tracked with git.
2022-02-12 13:46:44 +01:00
Jonas Platte
59907ca579
identifiers: Add more From impls for non-validated opaque identifiers
2022-02-12 03:37:42 +01:00
Jonas Platte
e9994b89c8
identifiers: Move room versions 8, 9 out of unstable-spec
...
… since v1.2 is out!
2022-02-02 23:06:39 +01:00
Jonas Platte
1a4e464422
Move restricted join rules and room versions 8, 9 from unstable-pre-spec to unstable-spec
2022-02-01 20:47:37 +01:00
Jonas Platte
9aa748459a
Revert "identifiers: Add SecretRequestId"
...
This reverts commit aafbe14923a9272029652e7f56ef2aa809b03e34.
2022-01-23 17:20:59 +01:00
Jonas Platte
aafbe14923
identifiers: Add SecretRequestId
2022-01-23 17:01:24 +01:00
Jonas Platte
7eb83f6b7a
identifiers: Update changelog
2022-01-17 12:07:07 +01:00
Jonas Platte
3c194ee43b
identifiers: Add port method to ServerName
2022-01-17 12:05:40 +01:00
Jonas Platte
4c2654c605
identifiers: Add host and is_ip_literal methods to ServerName
...
Co-authored-by: Timo Kösters <timo@koesters.xyz>
2022-01-17 12:05:14 +01:00
Jonas Platte
ef6728abde
Add a TransactionId type
2022-01-16 23:17:23 +01:00
Jonas Platte
ee977b48f0
Make the inner type of _Custom enum variants unusable
...
The variant itself would be private if possible, this is the solution
closest to that.
2022-01-13 11:38:48 +01:00
gnieto
824cefb3e9
Properly validate localpart when parsing UserId
...
When a `UserId` was created via `parse_with_server_name` (and its
variants), the localpart was not validated. This lead to invalid user
ids being constructed and lead to a crash when `is_historical` was
called.
This changes will prevent that this invalid user is can be constructed.
2022-01-03 14:58:38 +00:00
Jonas Platte
9621b83d49
Use doc_auto_cfg for automatic cfg documentation
2022-01-02 19:22:42 +01:00
Jonas Platte
57cbe491f0
Move RoomVersionId::V7 out of unstable-pre-spec
...
Matrix v1.1 stabilized room version 7.
2021-12-17 18:51:38 +01:00
Jonas Platte
c48aead00e
identifiers: Replace qualified paths with imports
2021-12-01 19:51:38 +01:00
Jonas Platte
bba7d62442
identifiers: Add Rc
/ Arc
parsing constructors
2021-11-26 21:03:11 +01:00
Jonas Platte
6324034f03
identifiers: Generate public parse
functions for opaque ID types with invariants
2021-11-26 20:57:47 +01:00
Jonas Platte
87194d5bf9
identifiers: Consolidate unsafe code
2021-11-26 20:41:59 +01:00
Jonas Platte
6c48926649
identifiers: Add more conversions for RoomOrAliasId
2021-11-26 17:50:29 +01:00
Jonas Platte
2a2028f1a7
identifiers: Remove runtime checks for RoomOrAliasId conversions
2021-11-26 17:50:04 +01:00
Jonas Platte
4132c43cbb
identifiers: Remove runtime checks for server_name extraction
2021-11-26 17:43:02 +01:00
Jonas Platte
c3382f085c
identifiers: Make device_id! return a reference
...
Not necessarily 'static like the other macros but otherwise consistent.
2021-11-26 16:47:55 +01:00
Jonas Platte
8923881678
identifiers: Rename RoomIdOrAliasId to RoomOrAliasId
2021-11-26 01:07:41 +01:00
Jonas Platte
6b76d7813e
identifiers: Shorten RoomVersionId variant names
2021-11-26 01:07:26 +01:00
Jonas Platte
f03065793b
identifiers: Update changelog
2021-11-26 00:53:07 +01:00
Jonas Platte
87051c3cb6
identifiers: Make server_name! macro return a reference instead of an owned value
...
It is easy to turn it into an owned value through `.to_owned()`.
The reverse was not possible without tying the reference to the lifetime
of a temporary variable.
2021-11-26 00:53:07 +01:00
Jonas Platte
a81769c3fd
identifiers: Clean up internal macros
2021-11-26 00:40:44 +01:00
Jonas Platte
f448f6756e
identifiers: Derive PartialEq, Eq, PartialOrd, Ord, Hash for str newtypes
...
… instead of generating them in our own macro.
2021-11-26 00:40:44 +01:00
Jonas Platte
5852658da5
identifiers: Make KeyId a DST
2021-11-26 00:40:44 +01:00
Jonas Platte
3ce578f384
identifiers: Make UserId a DST
2021-11-26 00:40:40 +01:00
Jonas Platte
313124a099
identifiers: Make RoomIdOrAliasId a DST
2021-11-26 00:04:28 +01:00
Jonas Platte
2d4dbfe42f
identifiers: Make RoomId a DST
2021-11-26 00:04:28 +01:00
Jonas Platte
b0db5e94e1
identifiers: Make RoomAliasId a DST
2021-11-26 00:04:28 +01:00
Jonas Platte
ec605a0959
identifiers: Make MxcUri a DST
2021-11-26 00:04:28 +01:00
Jonas Platte
a38f78e2d3
identifiers: Move opaque identifier declarations out of macro
2021-11-26 00:04:28 +01:00
Jonas Platte
52608cc72c
identifiers: Make EventId a DST
2021-11-25 22:34:40 +01:00
Jonas Platte
c73eb7dce3
identifiers: Make DeviceKeyId a DST
2021-11-25 21:07:14 +01:00
Jonas Platte
206c25e7e7
identifiers: Add more PartialEq implementations
2021-11-25 21:07:14 +01:00
Jonas Platte
ce947741cb
identifiers: Reduce macro code duplication
2021-11-25 21:07:14 +01:00
Jonas Platte
438efee143
identifiers: Remove Box<$id> aliases
2021-11-25 21:07:14 +01:00
Jonas Platte
1a87403ba2
Rewrite some Display & Debug implementations
...
To delete in a more obvious way and to include debug formatting for
Debug impls (i.e. enclose the string in quotes).
2021-11-18 19:49:40 +01:00
Andy Balaam
b4226f882b
identifiers: Document how to create a DeviceId
2021-11-18 16:57:01 +01:00
Jonas Platte
aa5fdf9d22
Merge serde attributes and improve docs
2021-10-08 12:49:13 +02:00
Jonas Platte
271491732e
Remove now-redundant doc(cfg) attributes
...
They are now implied:
https://github.com/rust-lang/rust/pull/89596
2021-10-08 11:52:18 +02:00
Jonas Platte
cb78a7f341
identifiers: Declare room versions 7, 8, 9
2021-10-02 18:16:19 +02:00
Jonas Platte
7cbffe35da
identifiers: Add matrix.to URL formatting
2021-09-23 21:12:57 +02:00
Jonas Platte
8b44f279c8
Use server_name! macro in tests
2021-09-23 20:33:45 +02:00
Jonas Platte
fe5d31a9a6
identifiers: Improve readability of one more method
2021-09-23 20:33:28 +02:00
Jonas Platte
e147308277
identifiers: Improve readability of server_name methods
2021-09-23 18:54:03 +02:00