strawberry
69b2bc4b8c
Merge remote-tracking branch 'upstream/main' into conduwuit-changes
2024-08-14 01:47:43 -04:00
strawberry
6bdc5ad326
Revert "optimize for optional static response headers zero-copy zero-alloc"
...
This reverts commit fd11fee88d937d69f557fa3d6ef09639c7b2e2f7.
2024-08-14 01:46:35 -04:00
strawberry
3174097e35
Revert "estimate and reserve capacity in outgoing headers map"
...
This reverts commit a6e340e24d570b1d924fff52c68d1dea72946b68.
2024-08-14 01:44:42 -04:00
strawberry
03037f6c92
Revert "Fix assumptions about header value types"
...
This reverts commit 767b7c72f782b04f8e7c714a152a08699ff8c1ca.
2024-08-14 01:44:16 -04:00
Jason Volk
fd11fee88d
optimize for optional static response headers zero-copy zero-alloc
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-12 22:59:57 +00:00
Jason Volk
a6e340e24d
estimate and reserve capacity in outgoing headers map
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-12 22:57:38 +00:00
Jason Volk
767b7c72f7
Fix assumptions about header value types
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-12 20:56:31 +00:00
Jason Volk
de41ebd92f
zero-alloc zero-copy identifier deserialization and validation
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-11 20:37:10 +00:00
Kévin Commaille
f73ba5556c
api: Allow types implementing ToString and FromStr for header values
...
Contrary to what the previous docs said, types implementing Display did not work,
only string types worked.
2024-07-14 12:28:48 +02:00
strawberry
9a5bfad849
Merge remote-tracking branch 'upstream/main' into conduwuit-changes
2024-06-30 11:54:39 -04:00
Jason Volk
cdac2a88f8
GATs are stable
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-25 05:44:50 +00:00
Benjamin Bouvier
fec2152d87
events: allow deserializing an event content with a type ( #1850 )
...
This allows deserializing all the `*EventContent` types into a parent `Any{...}EventContent`, assuming we know the type of the underlying event.
Required for serializing/deserializing the content of events we'd like to send, across application restarts, as in https://github.com/matrix-org/matrix-rust-sdk/issues/3361 for the Rust SDK.
---
* events: add deserialize_with_type to all the *EventContent types
* events: add smoke test for deserializing an event content with a type
* events: add a test for deserializing a secret storage key event content
* events: add fix for correctly matching events with a type fragment
* Address review comments.
2024-06-24 10:55:12 +02:00
Kévin Commaille
968c52b117
api: Rename request macro attribute query_map to query_all
...
Remove its IntoIterator bound to allow to represent
the query fields as a single struct or enum.
2024-06-21 19:15:59 +02:00
Kévin Commaille
00a17dbe9d
events: Fix deserialization of AnyGlobalAccountDataEvent for variants with type fragment
2024-06-21 18:10:31 +02:00
Kévin Commaille
f535ce700d
macros: Remove dead code
2024-05-12 15:49:28 +02:00
Kévin Commaille
d6c4533b7d
chore: Fix new warnings
2024-05-12 15:49:28 +02:00
Kévin Commaille
efd0b4f308
Release ruma-macros 0.13.0
2024-05-09 12:11:41 +02:00
Jonas Platte
5e68c93ec8
Upgrade proc-macro-crate from 2.0 to 3.0
2024-04-28 22:52:18 +02:00
avdb13
8881755235
api: Add status parameter to request attribute macro
...
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
2024-04-24 14:44:49 +02:00
Kévin Commaille
1e185ddb9d
Create m.lowercase renaming rule
2024-04-07 15:46:24 +02:00
Jonas Platte
4a02b97aa3
Update website URL
2024-04-04 13:20:58 +02:00
Kévin Commaille
e249f08f4b
client-api: Add server support discovery endpoint
...
According to MSC1929 / Matrix 1.10
2024-03-23 09:34:36 +01:00
Jonas Platte
c82f600d6a
Fix new lints
2023-11-08 18:16:44 +01:00
Jonas Platte
e658b8b128
Remove 'www.' from ruma.io URLs
2023-10-12 15:44:00 +02:00
Jonas Platte
7cee1787a2
Release ruma-common 0.12.0
2023-10-05 11:21:46 +02:00
Jonas Platte
7f7d6ee533
Upgrade dependencies
2023-10-05 10:59:59 +02:00
Kévin Commaille
a70f99a233
macros: Allow EventContent derive macro to work on enums
...
Requires to disable all automatic type generation.
2023-09-15 13:19:22 +02:00
Jonas Platte
31331f3165
Bring back ruma-events
...
Co-authored-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-08-28 10:23:54 +02:00
Jonas Platte
ba2914a22a
macros: Simplify symbol path
2023-08-25 10:36:25 +02:00
Kévin Commaille
4ac0ae1392
macros: Implement AsRef<{id}> for {id}
2023-08-24 14:57:57 +02:00
Jonas Platte
8e10064364
Enforce import grouping
...
Includes a few manual changes to make rustfmt behave a bit better.
2023-08-22 12:31:49 +02:00
Kévin Commaille
bcae4e5799
chore: Use .is_some_and(…) instead of .map_or(false, …)
2023-08-14 16:17:25 +02:00
Kévin Commaille
e780633cce
events: Allow to declare events without a stable prefix
2023-07-27 16:04:58 +02:00
Jonas Platte
3dac70ead9
Remove most unreachable visibility modifiers
2023-07-19 14:32:14 +02:00
Jonas Platte
ad457c1c11
Rerun rustfmt
2023-07-19 13:53:15 +02:00
Jonas Platte
cfc4c66820
Rewrap lines to fit macro input in maximum line length
2023-07-19 13:53:03 +02:00
Kévin Commaille
77d94caf11
chore: Use workspace-defined MSRV
2023-07-04 15:40:37 +02:00
Jonas Platte
cb512f01d6
macros: Fix weird indentation
2023-04-24 17:02:23 +02:00
Jonas Platte
53622f8ce0
macros: Upgrade syn to 2.0
2023-04-24 17:02:23 +02:00
Jonas Platte
4c85fe9c78
Replace compat feature with more fine-grained compat-* features
...
… and document them.
2023-04-20 14:00:27 +02:00
Jonas Platte
89e398fd06
events: Add back relations accessors for message-like event enums
2023-04-18 11:33:54 +02:00
Jonas Platte
19d44489c3
events: Split bundled relations into two types
...
One for message-like events, one for state events.
2023-03-15 14:49:49 +01:00
Jonas Platte
0599eb1226
macros: Fix confusing name of local bindings
2023-03-15 12:33:09 +01:00
Jonas Platte
01acabe8a6
identifiers: Implement AsRef<[u8]> for owned ID types
2023-03-07 11:18:14 +01:00
Jonas Platte
5aa0f29935
identifiers: Add AsRef<[u8]> impls for ID types
2023-03-07 11:06:34 +01:00
Kévin Commaille
f17f288a3f
Release ruma-common 0.11.3
2023-02-15 12:44:42 +01:00
HKalbasi
ca99c97a0c
Use #[deprecated]
instead of doc comments
2023-02-12 19:18:06 +01:00
Jonas Platte
94c01077c5
Release ruma-common 0.11.2
2023-02-07 21:04:39 +01:00
Jonas Platte
9c65a7dcae
events: Use input visibility for generated types in EventContent derive
2023-02-07 20:55:53 +01:00
Jonas Platte
093c231792
Release ruma-common 0.11.1
2023-02-02 13:02:45 +01:00