Devin Ragotzy
4e2f1a19e1
Fix typo and rename copy_lifetime_ident -> collect_lifetime_ident
2020-08-07 00:48:01 +02:00
Devin Ragotzy
f67744bb4f
Throw error if query_map has any ref types
2020-08-07 00:48:01 +02:00
Devin Ragotzy
588a6035f0
Use Outgoing trait in ruma_api_lifetime tests
2020-08-07 00:48:01 +02:00
Devin Ragotzy
80237d6dd1
Fix clippy warnings
2020-08-07 00:48:01 +02:00
Devin Ragotzy
c980644d77
Clean up and fix missing comma for request query map
2020-08-07 00:48:01 +02:00
Devin Ragotzy
e36149aea1
Add tuple lifetime stripping to derive_outgoing
2020-08-07 00:48:01 +02:00
Devin Ragotzy
0793724264
Refactor to use Req/ResLifetimes struct for adding lifetimes to req/res
2020-08-07 00:48:01 +02:00
Devin Ragotzy
e7f7c3bb9d
Add lifetime params to Request/Response when needed
2020-08-07 00:48:01 +02:00
Devin Ragotzy
1155edcaed
Add lifetime discovery and collection functions to ruma-api-macro
2020-08-07 00:48:01 +02:00
Devin Ragotzy
2fbdd674ab
Refactor impl_outgoing_with_incoming_self and add struct variant
2020-08-01 18:19:17 +02:00
Devin Ragotzy
f0fb9a69c0
Handle enums and nested types properly
2020-08-01 18:19:17 +02:00
Jonas Platte
f5c529bc36
Try not to rely on prelude in ruma-api-macros generated code
...
… and fix some lines that were too wide
2020-08-01 01:21:09 +02:00
Jonas Platte
12c7a4a17c
Rewrap comment
2020-08-01 01:02:45 +02:00
Jonas Platte
10184cb9ca
Use a dedicated method for conversion from Ruma request type to http::Request
2020-08-01 01:01:15 +02:00
Devin Ragotzy
c86f0b106b
Re-add the Outgoing trait and derive macro
...
The Outgoing trait now has no attributes except incoming_no_deserialize,
it looks for any references and lifetimes in a struct declaration and
removes them. The point of the Outgoing trait is to allow references to
be serialized and owned values to come out of deserialization. It has no
ability to wrap values in Raw (then EventResult).
2020-07-31 12:59:19 -04:00
Devin Ragotzy
b68b63ab8d
Remove runtime panic caused by header <-> string conversion
2020-07-28 17:13:33 -04:00
Devin Ragotzy
4c01fee5c5
Move new type body init field (last field initialized)
2020-07-28 17:13:26 -04:00
Jonas Platte
ce04ea10bf
Remove no longer needed extern crate proc_macro;
declarations
2020-07-24 21:21:13 +02:00
Jonas Platte
05a99a00a0
Only use matches crate as a dev-dependency
2020-07-22 23:06:35 +02:00
Devin R
605680530b
Add ability to feature gate fields in ruma_api! macro
2020-07-15 19:14:04 -04:00
Jonas Platte
ded60cc935
Use matches! instead of manual match
-> bool
2020-07-15 12:21:32 +02:00
Ragotzy.devin
4ff6c6ecbe
Refactor Request/Response's TryFrom impl by generating match stmt
...
... by moving repetitive parts into a macro_rules macro
2020-07-08 01:44:25 +02:00
Ragotzy.devin
214c1b681f
Add guard in ruma_api! macro for invalid characters in path
...
Returns a compiler error if any non ASCII characters are found. Add
trybuild test for invalid path characters.
2020-07-02 16:27:49 +02:00
Ragotzy.devin
b08b1d1819
Refactor large blocks of Api::to_tokens into separate functions
2020-07-01 23:35:18 +02:00
Ragotzy.devin
5376a3fc6e
Add colons to ruma_api! macro after each keyword
2020-06-30 13:06:37 +02:00
Ragotzy.devin
9dab2f5b1f
Fix clippy warning in nightly CI
2020-06-13 14:02:53 +02:00
Jonas Platte
f8b1aef906
Integrate ruma-api
2020-06-05 01:59:26 +02:00