14 Commits

Author SHA1 Message Date
Jonas Platte
675efbc5f1
events-macros: Improve readability, fix lines >100 chars 2020-11-27 23:07:09 +01:00
skim
5b904ddbd7
Update links to main branch 2020-10-13 10:24:54 +02:00
Jonas Platte
8b9e20b842
Fix outdated links 2020-09-29 20:10:54 +02:00
Devin Ragotzy
e2f84679b3
Use proc_macro_crate name in the event content derives 2020-08-11 23:47:34 +02:00
Devin Ragotzy
cfe62f27d0
Re-export ruma-events-macros and deps in ruma-events
This also adds the dependency and function to find crate name at macro
expansion time.
2020-08-11 23:47:34 +02:00
Jonas Platte
ce04ea10bf
Remove no longer needed extern crate proc_macro; declarations 2020-07-24 21:21:13 +02:00
Devin R
4b9fdcb189 Use EventKind/Variation in the Event derive macro
Move the event parsing into it's own mod to be shared by event.rs.
2020-07-23 15:01:12 +02:00
Ragotzy.devin
1db4898cde
Refactor the input parsing of event_enums! 2020-07-13 15:31:15 +02:00
Ragotzy.devin
5e428ac95a
Add support for redacted events
* Generate redacted event enums and implement corresponding event structs
* Enable the *EventContent derives to generate redacted events

  Most redacted event code is now generated by the *EventContent derive
  macro. The exception are any content structs with the custom_redaction
  attribute. This leaves implementing up to the user.
* Add redact method to Redaction/CustomEventContent
* Add accessor methods for redacted event enums
* Add RedactedEventContent trait and super traits to match EventContent
2020-07-11 14:59:36 +02:00
Ragotzy.devin
41b8bd77f5
Add field accessor code-gen for the event_enum! macro 2020-06-30 14:59:24 +02:00
Ragotzy.devin
69d5da4018
Add a Custom variant to Any*Event enums 2020-06-19 18:32:42 +02:00
Ragotzy.devin
184aafa5f6
Revert " Remove event_enum! and only use event_content_enum"
This reverts commit 2a91dc1eb7215a762bd2204bc103ef172258d2d9. Also

* Add back type defs and Any*Event enums
* Move EventDeHelper and from_raw_json_value to lib make pub so event_enum! macro can use them and test. 
* Fix Any*Event enum deserialization error
* Remove event_content_enum! macro and ruma-events-macros/src/content_enum.rs
* Use serde's IgnoreAny to skip Unknown field's value
* Clean up imports and test names for state_event
2020-06-19 11:36:53 +02:00
Ragotzy.devin
9dab2f5b1f
Fix clippy warning in nightly CI 2020-06-13 14:02:53 +02:00
Jonas Platte
0a788c1273
Integrate ruma-events 2020-06-10 22:20:41 +02:00