Ragotzy.devin
92a2dfa2e8
Uncomment all event enum variants, convert remaining ruma_event!
usages
2020-06-10 13:10:50 +02:00
Jonas Platte
10ad9760d6
Extend MembershipChange::ProfileChanged
2020-06-10 09:43:14 +02:00
Jonas Platte
7491b33e81
Add MemberEvent type alias
2020-06-09 23:38:14 +02:00
Ragotzy.devin
c2b1c9897b
Any event enum macro implementation (also generates event content enums)
2020-06-09 23:31:31 +02:00
Ragotzy.devin
1fdf986bae
Add RedactionEvent and convert RedactionEventContent to struct def
...
PresenceEventContent and RedactionEventContent now also derive *EventContent
2020-06-09 12:43:21 +02:00
Ragotzy.devin
d38e385aab
Remove unused imports and fix serde::ser::Error trait not being in scope
2020-06-08 14:40:59 +02:00
Ragotzy.devin
ef3a6787a0
Remove src/from_raw.rs and ruma-events-macro/src/from_raw.rs
2020-06-07 22:21:04 +02:00
Ragotzy.devin
0a91ac5126
Remove raw mod and TryFromRaw/FromRaw, derive Deserialize for event content types
2020-06-07 01:18:42 +02:00
Jonas Platte
b95b7db0d4
Convert remaining state structs from ruma_event! to derive(StateEventContent)
2020-06-07 01:18:42 +02:00
Jonas Platte
74f680f8ed
Add back all commented-out room events
2020-06-07 01:18:42 +02:00
Ragotzy.devin
80ff10ae6a
Move event content collection trait impl's into macro code
...
* Move the EventContent and content marker traits into macro.
* Move the raw AnyStateEventContent enum and RawEventContent trait into macro, generate all of the AnyStateEventContent type and impls needed for raw.
* Factor out raw mod codegen to seperate fn, add docs to codegen enum + variants, remove unused imports
2020-06-07 01:11:15 +02:00
Jonas Platte
5091b9a9a8
Integrate generic event types and EventContent trait with TryFromRaw
2020-06-07 01:11:15 +02:00
Jonas Platte
1377487b6c
Declare more state event content structs without ruma_event!
2020-06-07 01:10:54 +02:00
Jonas Platte
eceef3b96d
Declare a few state event content structs without the ruma_event! macro
2020-06-07 01:09:12 +02:00
Ragotzy.devin
ef6e2e7023
Add derive macro for StateEventContent
2020-06-07 01:02:49 +02:00
Ragotzy.devin
f0c94958fa
Move raw
mod into FromRaw derive
2020-06-07 01:02:49 +02:00
Ragotzy.devin
1a9b0f3e8b
Add StateEvent<C> and AnyStateEvent
2020-06-07 01:02:49 +02:00
Ragotzy.devin
3d01bfa96d
Remove Event, RoomEvent and StateEvent traits
2020-06-07 01:02:49 +02:00
Jonas Platte
61e6493432
Sort derives by crate
2020-06-04 21:03:34 +02:00
Jonas Platte
3f74ba3270
Box optional sub-structs in avatar and message events
...
… to heavily decrease the size of some types.
Most importantly: MessageEventContent goes from 640 to 104 bytes in size
2020-06-04 17:48:52 +02:00
Jonas Platte
2eb29abd74
Remove FIXME in member.rs
...
This is being adressed in the spec, see
https://github.com/matrix-org/matrix-doc/pull/2591
2020-06-02 12:16:51 +02:00
Jonas Platte
da7a97d490
Fixup for 16b9557
2020-05-31 22:56:51 +02:00
Jonas Platte
16b9557d74
Consolidate formatted body fields for message events
2020-05-31 16:10:01 +02:00
Jonas Platte
70b3ff2737
Update Matrix specification links
2020-05-31 15:50:17 +02:00
Timo Kösters
4d09416cd1
Add alt_aliases to CanonicalAliasEventContent
2020-05-30 17:51:23 +02:00
Jake Waksbaum
e05fdf84fd
Replace serde/strum renames with rename_all
...
Instead of applying a `#[serde(rename = "foo")]` or `#[strum(serialize =
"foo")]` to each field of a struct or variants of an enum, apply the
appropriate `#[serde(rename_all = "style")]` or `#[strum(serialize_all =
"style")]` to the struct/enum.
In addition, in the places where the `lowercase` style is used and all
the fields/variants are a single word, replace that with `snake_case`,
since that seems to be the default everywhere with multi-word
fields/variants.
2020-05-29 10:59:33 -04:00
Jake Waksbaum
d84de004c8
Replace impl_enum with strum::{EnumString,Display}
...
Replace the impl_enum! macro, which automatically derives instances of
std::fmt::Display and std::string::FromStr, with derive macros from the
strum crate (Display and EnumString resp.).
Closes #90 .
2020-05-29 10:59:33 -04:00
Jonas Platte
a398be6dd1
Fix test for m.room.create event
2020-05-26 10:25:23 +02:00
Jonas Platte
d3ff2b65a7
Implement Default for PowerLevelsEventContent
2020-05-26 10:24:14 +02:00
Jonas Platte
512496baeb
Add skip_serializing_if to CreateEventContent
2020-05-26 10:04:57 +02:00
Jonas Platte
114f739d43
Re-add type field serialization for MessageEvent
...
It was removed in b8eafc3f5937589f1c75dac74ceb796041a72b82, probably by
accident
2020-05-24 18:44:06 +02:00
Jonas Platte
5a0935cd6b
Fix message test naming
2020-05-24 18:29:33 +02:00
Jonas Platte
c2e3298b2a
Fix duplicate msgtype field in m.message serialization
2020-05-03 23:11:34 +02:00
Jonas Platte
0b26d71537
Re-run cargo fmt
2020-05-02 23:36:03 +02:00
Jonas Platte
b8eafc3f59
Update room::message
...
* Derive Deserialize for raw::MessageEventContent
* Remove MessageType
2020-05-02 23:25:46 +02:00
Jonas Platte
2f706d9a85
Remove invalid variant from room::message::MessageEventContent
2020-05-02 23:12:50 +02:00
Jonas Platte
fc78e49d49
Update representation of encrypted event content
2020-05-02 22:54:42 +02:00
Jonas Platte
17faaaa56e
Bump MSRV to 1.40.0
2020-05-02 22:14:05 +02:00
Jonas Platte
f65615075e
Update serde attrs for room::message::LimitType
2020-05-02 21:28:13 +02:00
Jonas Platte
51ad28081e
Use ruma_event! for room::server_acl
2020-05-02 21:25:02 +02:00
Jonas Platte
24f519ba29
Update serde attrs in room::guest_access
2020-05-02 18:49:12 +02:00
Jonas Platte
08418daeb2
Remove NotificationPowerLevels::is_default
2020-05-02 14:16:31 +02:00
Jonas Platte
ca5c65ef10
Revise trait implementations
2020-05-02 14:15:13 +02:00
Jonas Platte
18a37efcac
Update room::name tests
2020-05-02 14:08:16 +02:00
Jonas Platte
f23d7414ec
Update json literal formatting
2020-05-02 11:10:31 +02:00
Jonas Platte
8e4ff82a83
Stop relying on PartialEq for tests
2020-05-02 00:17:41 +02:00
Jonas Platte
752ea73010
Update serde attrs in room::member
2020-05-01 20:19:55 +02:00
Jonas Platte
28136cf1f6
Update serde attrs in room::history_visibility
2020-05-01 20:03:43 +02:00
Jonas Platte
6e1f8ded2d
Add format, formatted_body to NoticeMessageEventContent
2020-05-01 12:54:37 +02:00
Jonas Platte
a19401c076
Update serde attrs in room::message::feedback
2020-05-01 12:32:49 +02:00