19 Commits

Author SHA1 Message Date
Jonas Platte
5175d3d622
api_macros: Improve readability, fix lines >100 chars 2020-11-27 23:06:31 +01:00
Jonas Platte
fdd326edf7
Move Outgoing from ruma-api to ruma-common
The derive macro moves from ruma-api-macros to a new ruma-common-macros
crate likewise.
2020-09-22 21:35:10 +02:00
Devin Ragotzy
906465d0c3
Replace all ::ruma_api:: with the discovered crate name or $crate 2020-08-12 14:01:43 +02:00
Devin Ragotzy
f455d4c8ab
Remove Response lifetime generation code in ruma_api macro
… and enforce that there are no lifetimes in response {}
2020-08-09 03:01:19 +02:00
Jonas Platte
1fbf05d71f
Fix some bad formatting 2020-08-08 21:52:58 +02:00
Devin Ragotzy
1060d63057 Use full type with Outgoing trait for request query deserialization 2020-08-07 00:48:01 +02:00
Devin Ragotzy
e783288ef0 Limit when RequestQuery impls Deserialize and impl Outgoing 2020-08-07 00:48:01 +02:00
Devin Ragotzy
5103baeb4b Add semicolons and the other possible syn::Type types 2020-08-07 00:48:01 +02:00
Devin Ragotzy
1336cd8c41 Handle tuple types in collect_lifetime_idents 2020-08-07 00:48:01 +02:00
Devin Ragotzy
4e2f1a19e1 Fix typo and rename copy_lifetime_ident -> collect_lifetime_ident 2020-08-07 00:48:01 +02:00
Devin Ragotzy
80237d6dd1 Fix clippy warnings 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
1155edcaed Add lifetime discovery and collection functions to ruma-api-macro 2020-08-07 00:48:01 +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
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