Jonas Platte
c7e84c5249
Fix clippy lints
...
Automated using `cargo clippy --fix`.
2022-10-26 13:38:29 +02:00
Jonas Platte
f22857e682
macros: Add request attribute macro
2022-10-24 15:28:50 +02:00
Jonas Platte
c021a14b60
macros: Rename error_ty => error
2022-10-24 15:28:50 +02:00
Jonas Platte
1be2def65a
Revert "api: Remove error_ty from Request and Response derive attributes"
...
This reverts commit 1989e0350d61ca769b258ce5f2f48360dc4b3f3c.
2022-10-24 15:28:50 +02:00
Jonas Platte
876e8e38aa
macros: Simplify Response derive attribute parsing
2022-10-22 12:25:27 +02:00
Jonas Platte
dff84efb0c
api: Remove authentication from Request derive attributes
2022-10-22 12:25:27 +02:00
Jonas Platte
c9bd9bf00b
api: Remove NonAuthRequest traits
2022-10-22 12:24:22 +02:00
Jonas Platte
1989e0350d
api: Remove error_ty from Request and Response derive attributes
2022-10-22 12:24:22 +02:00
Jonas Platte
e7e39a6af1
api: Remove method from Request derive attributes
2022-10-22 12:24:21 +02:00
Jonas Platte
70c5e84107
macros: Remove unnecessary self:: qualitication
2022-10-22 11:29:58 +02:00
Jonas Platte
ec31badd84
api: Replace path fields in Metadata with new VersionHistory type
...
Co-authored-by: Jonathan de Jong <jonathan@automatia.nl>
2022-10-22 11:17:55 +02:00
Jonas Platte
6642686b58
macros: Remove unused custom keywords
2022-10-22 11:12:52 +02:00
Jonas Platte
764e96a254
api: Enforce consistent path field order
2022-10-20 20:51:09 +02:00
Kévin Commaille
ec853e968a
events: Generate structs without relation for events that can be replaced
2022-10-17 20:27:49 +02:00
Jonas Platte
cc514a2b6c
macros: Allow opt-out of Debug
deriving for incoming types
2022-10-17 17:16:38 +02:00
Kévin Commaille
739c35aaca
api: Allow to use any HeaderName with the header keyword of ruma_api
2022-10-10 19:09:39 +02:00
Kévin Commaille
d55573a555
api: Remove AuthScheme::QueryOnlyAccessToken
...
It is no longer used by the Appservice API.
2022-10-02 15:08:31 +02:00
Jonas Platte
715c226975
api: Make select_path and make_endpoint_url methods on Metadata
...
… and remove #[doc(hidden)] attribute.
2022-09-29 15:49:39 +02:00
Jonas Platte
8290d712f2
api: Move the majority of endpoint URL building out of macro code
2022-09-29 15:49:39 +02:00
Jonas Platte
a6e23d731e
api: Slighty reduce the amount of macro-generated code
...
By moving format(_args)! usage into a regular fn and calling that from
the proc-macro-generated code.
2022-09-29 15:49:39 +02:00
Jonas Platte
2dbaf19ded
macros: Refactor ResponseField
2022-09-26 16:03:05 +02:00
Jonas Platte
a59a648d04
macros: Refactor RequestField
2022-09-26 15:48:45 +02:00
Jonas Platte
028eb8a457
events: Remove deprecated API
2022-09-22 11:50:22 +02:00
Jonas Platte
97387f36c1
macros: Fix outdated documentation
2022-09-22 11:47:32 +02:00
Jonas Platte
fa61cc1248
events: Add relations accessors to event enums
2022-09-16 11:34:54 +02:00
Jonas Platte
956871cfa6
macros: Rename is_room to is_timeline
2022-09-16 11:28:16 +02:00
Jonas Platte
aa8e48d1c3
events: Allow customizing the unsigned type of state events
2022-09-12 13:10:10 +02:00
Jonas Platte
35d8bdd5a1
events: Move StateUnsigned::_from_parts into a trait
2022-09-12 12:03:29 +02:00
Jonas Platte
674137c41d
events: Use CanBeEmpty trait for skipping unsigned serialization
2022-09-12 11:44:05 +02:00
Jonas Platte
24d0b2e2bb
events: Implement content sub-traits for event content enums
2022-09-06 18:35:43 +02:00
Jonas Platte
7957dd6adf
events: Replace generic "alias" trait implementations by individual ones
...
… so that rustdoc lists types implementing them properly.
2022-09-05 11:16:30 +02:00
Jonas Platte
c745d3baf7
Fix clippy lint
2022-09-02 14:07:28 +02:00
Jonas Platte
28f70467ca
macros: Document event type aliases
2022-08-04 13:35:24 +02:00
Jonas Platte
909e80841f
macros: Ensure that crates using ruma_api macro have client and server features
2022-07-19 09:37:38 +02:00
Jonas Platte
b11f09030a
macros: Improve docs note on ruma_api macro
2022-07-19 09:35:47 +02:00
Jonathan de Jong
8f8937b29e
identifiers: Add Into Box & Arc, and PartialEq Arc ( #1235 )
...
* Add Into Box & Arc, and PartialEq Arc
* change into to from
* Apply suggestions from code review
Co-authored-by: Jonas Platte <jplatte@element.io>
Co-authored-by: Jonas Platte <jplatte@element.io>
2022-07-12 10:44:02 +02:00
Marcel Hellwig
92f862e279
macros: Generate certain structs only with client or server feature enabled
...
If neither the client, nor the server feature is enabled the fields are
unused and therefore trigger the dead_code lint.
2022-06-22 14:15:37 +02:00
Jonas Platte
195091c051
Update clippy issue reference
2022-06-21 18:03:46 +02:00
Jonas Platte
cb96caa064
identifiers: Add session_id macro
2022-06-08 13:31:38 +02:00
Jonas Platte
56cf3ce94c
Allow buggy clippy lint on a per-crate basis
...
The previous method of allowing it through .cargo/config.toml doesn't
seem to work anymore.
2022-06-08 11:45:29 +02:00
Jonas Platte
8912182c56
Increase usage of implicit named arguments in format strings
2022-06-03 10:06:28 +02:00
Jonas Platte
73c2963ebd
Enforce consistent semicolons after ()
-typed expressions in blocks
2022-06-03 08:40:16 +02:00
Jonathan de Jong
49c770c9f4
macros: Compress repeated segments of quote!
ed macro output
2022-06-01 11:47:07 +02:00
Kévin Commaille
240c8bc4b8
macros: Derive as_str()
for types that derive StringEnum
2022-05-30 17:17:06 +02:00
Kévin Commaille
24b4dd69ad
macros: Add derive macro to implement as_str()
from AsRef<str>
2022-05-30 17:17:06 +02:00
Jonas Platte
5f902851af
Upgrade to Rust 2021
2022-05-27 12:04:23 +02:00
Kévin Commaille
734770d2bc
macros: Refactor ruma_api attributes parsing
2022-05-23 21:51:47 +02:00
Kévin Commaille
74423b7a4e
events: Split EventMeta between struct and field attributes
2022-05-16 17:08:36 +02:00
Kévin Commaille
1073530ac6
events: Add support for type aliases
...
Allow to use unstable types
2022-05-16 13:24:25 +02:00
Kévin Commaille
abf735093c
events: Fix serde of event types with suffix
2022-05-09 10:41:22 +00:00