35 Commits

Author SHA1 Message Date
Devin Ragotzy
b3196d7f64
Enforce public visibility of all fields of structs deriving Outgoing 2020-10-03 11:39:32 +02: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
Vincent Lee
d36d005b97
Change requires_authentication: bool to authentication: AuthScheme 2020-09-18 16:28:51 +02:00
Jonas Platte
01c7eef72f
Consistently put an empty line after inner module docs 2020-08-24 21:42:48 +02:00
Devin Ragotzy
a8b4bad684
Support optional header values in request/response types 2020-08-21 19:53:46 +02:00
Jonas Platte
30a0a39d2b
Outgoing derive: Replace incoming_no_deserialize with incoming_derive(!Deserialize) 2020-08-17 22:08:56 +02:00
Devin Ragotzy
a6c1b8f0bd
Parse and emit attributes connected to the request/response defs in ruma_api macro 2020-08-14 00:01:19 +02:00
Jonas Platte
987d48666c
Split Endpoint trait into OutgoingRequest, IncomingRequest 2020-08-12 23:33:27 +02:00
Jonas Platte
abc34eeb7e
Move manual endpoint impl test into its own file 2020-08-12 23:33:27 +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
a0a1987bbf
Small style fix 2020-08-09 00:01:50 +02:00
Jonas Platte
0366466792
Use toplevel imports in ruma_api! expansion 2020-08-08 21:23:07 +02:00
Jonas Platte
c2cf8682e6
Don't use * imports in ruma_api_lifetime test 2020-08-08 13:23:57 +02:00
Devin Ragotzy
7e3ebff089 Add tests testing failing Outgoing derive for query fields 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
588a6035f0 Use Outgoing trait in ruma_api_lifetime tests 2020-08-07 00:48:01 +02:00
Devin Ragotzy
2beaf450a3 Add a query_map field to ruma_api! lifetime test 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
f0a5a43455 Move lifetime tests into their own file 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
c2342e3ef7 Add failing test to ruma-api for lifetimes in ruma_api! macro 2020-08-07 00:48:01 +02:00
Jonas Platte
9bc6ce9201
Use identifier macros for tests 2020-08-05 00:12:44 +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
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
71e537d123 Move move-value test decl into logical mods for each 2020-07-29 08:50:08 -04:00
Devin Ragotzy
47b6adb524 Add tests for ruma_api! macro ensuring request/response generation ok 2020-07-28 18:55:02 -04:00
Devin Ragotzy
f00bad3895 Add try_build test testing new type body fields are declared last 2020-07-28 17:13:33 -04:00
skim
b260a13d4b
move and rename ruma_events::json::EventJson to ruma_common::raw::Raw 2020-07-16 07:31:36 -07: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
Devin R
ff2cbc282b Add trybuild tests for the ruma_api! macro 2020-07-01 21:27:47 +02:00
Ragotzy.devin
5376a3fc6e
Add colons to ruma_api! macro after each keyword 2020-06-30 13:06:37 +02:00
Jonas Platte
0a788c1273
Integrate ruma-events 2020-06-10 22:20:41 +02:00
Jonas Platte
51d7875b2f Add 'ruma-api/' from commit '2151711f64e99a5da370d48fa92795f2d4799866'
git-subtree-dir: ruma-api
git-subtree-mainline: bb037a5c42c51567a3b9e41c2c131cef9867a4aa
git-subtree-split: 2151711f64e99a5da370d48fa92795f2d4799866
2020-06-05 01:56:19 +02:00