Jonas Platte
565e3a1ee7
Merge LICENSE files
...
The Copyright notice is taken out because no single person has a
copyright to the entire codebase.
2020-09-26 15:52:52 +02:00
Jonas Platte
fa44fd5c55
Remove outdated Travis badges
2020-09-26 15:37:08 +02:00
Jonas Platte
c87ec49594
Update authors field in ruma-events-macros/Cargo.toml
2020-09-22 21:04:00 +02:00
Jonas Platte
7122720bfe
Add LICENSE file to ruma-events-macros
...
For some reason it was missing.
2020-09-22 21:03:02 +02:00
Jonas Platte
578f6c8925
Replace r0::room::create_room::InitialStateEvent
with ruma_events::InitialStateEvent
2020-08-17 23:36:00 +02:00
Jonas Platte
6006e0b52e
Rename local variable
2020-08-17 23:24:13 +02:00
Devin Ragotzy
342181ab1a
Use proc_macro_crate name in the event_enum! macro code-gen
2020-08-11 23:47:34 +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
9bc257b19e
Use proc_macro_crate name in the Event derive
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
1fbf05d71f
Fix some bad formatting
2020-08-08 21:52:58 +02:00
Jonas Platte
d6d84a9a70
Bump ruma-identifiers version
2020-08-08 18:28:23 +02:00
Jonas Platte
a1916837f9
Bump ruma-identifiers version
2020-08-08 16:21:11 +02:00
Jonas Platte
30e73186e7
Bump dependencies
2020-08-07 19:13:00 +02:00
Devin Ragotzy
606f988ed8
Add doc comments for cmp traits and use unambiguius paths
2020-08-03 17:39:50 +02:00
Devin Ragotzy
3f370c5f1b
Add PartialEq/Eq and PartialOrd/Ord to the event structs with event_ids
2020-08-03 17:39:50 +02:00
Devin Ragotzy
b6c289c3d2
Clean up before starting to implement eq/ord trait
2020-08-03 17:39:50 +02:00
Jonas Platte
fa8c7b020b
Release ruma-events 0.22.0-alpha.1
2020-07-29 17:09:29 +02:00
Jonas Platte
5086a6654a
Update changelog for ruma-events-macros
2020-07-29 16:54:11 +02:00
Jonas Platte
c1677aa4c0
Fix cargo metadata
2020-07-29 16:36:48 +02:00
Devin Ragotzy
4a34375449
Support multiple attribute arguments in ruma_event attribute ( #161 )
...
* Add parsing to allow ruma_event attribute to accept mutli args
* fixup! Add parsing to allow ruma_event attribute to accept mutli args
* Refactor MetaAttrs::parse and resolve review issues
2020-07-26 19:18:28 -04:00
Jonas Platte
1862d15365
Remove glob imports of C-like enums
2020-07-26 17:13:08 +02:00
Jonas Platte
c363494905
Release ruma-identifiers 0.17.1
2020-07-26 15:04:20 +02:00
Jonas Platte
ce04ea10bf
Remove no longer needed extern crate proc_macro;
declarations
2020-07-24 21:21:13 +02:00
Devin Ragotzy
4be63127f7
Add into_full_event and From<> impls to convert between sync and full events
2020-07-24 14:45:38 +02:00
Devin R
3329dc7345
Fix clippy warnings in identifiers and events-macros
2020-07-23 15:01:12 +02:00
Devin R
56ff7c05e9
Remove the Ident from EventKind and impl Display for both enums
2020-07-23 15:01:12 +02:00
Devin R
2e1e63671d
Turn long matches! into is_redacted EventKindVariation method
2020-07-23 15:01:12 +02:00
Devin R
a39c0106d4
Generate EventKind/Variation pair from Event derive input
2020-07-23 15:01:12 +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
Jonas Platte
080a537664
Release ruma-identifiers 0.17.0
2020-07-22 23:06:44 +02:00
Jonas Platte
05a99a00a0
Only use matches crate as a dev-dependency
2020-07-22 23:06:35 +02:00
Devin R
3a0138dea1
Use Box instead of Raw for the redacted Unsigned types redacted_because
2020-07-22 20:29:01 +02:00
Devin R
b55f82742c
Fix sync ephemeral room events code-gen enum definition
2020-07-21 14:54:57 +02:00
Devin R
848b225681
Group/move functions around in the event_enums module
2020-07-17 14:20:17 +02:00
Devin R
cd2f011fb3
Add AnyPossiblyRedacted* enums to event_enum! code-gen
2020-07-17 14:20:17 +02:00
Ragotzy.devin
1db0082281
Add redact method to all event_enum! generated enums
...
… and to AliasesEventContent
2020-07-17 01:07:07 +02:00
Ragotzy.devin
e7d9fb785d
Split UnsignedData into multiple types
...
* Rename UnsignedData -> Unsigned
* Add RedacedUnsigned and RedactedSyncUnsigned
2020-07-16 02:34:36 +02:00
Devin R
6f69a6fe76
Fix redacted aliases event deserialization
2020-07-15 17:10:47 +02:00
Jonas Platte
1a1884ce81
identifiers: Bump version (prerelease), update change log
2020-07-15 00:45:47 +02:00
Devin R
204a90ac43
Rename *EventStub -> Sync*Event
2020-07-14 13:44:39 -04: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
928fe6ce26
Add AnyEphemeralRoomEventStub and use it in sync response
2020-06-25 13:19:39 +02:00
Devin R
2b6eba69dd
Add membership_change method to stub and stripped event
...
Fix redaction event detection in event_enum! macro. Add encrypted event
to AnyMessageEvent enum.
2020-06-24 02:11:28 +02:00
Ragotzy.devin
fdf87a38a2
Generate stub/stripped Any*Event enums in event_enum! macro
...
* Conditionally emit tokens for content enum in event_enum! and the path
for each Any*Event variant contents.
* Add tests for redaction events now that they are part of Any*Event enums.
* Fix any tests that used Any*EventContent.
2020-06-23 22:33:37 +02:00
Jonas Platte
c621f220b9
Bump dependency versions
2020-06-19 22:53:07 +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