Macro ruma_events_macros::event_enum[][src]

event_enum!() { /* proc-macro */ }

Generates an enum to represent the various Matrix event types.

This macro also implements the necessary traits for the type to serialize and deserialize itself.

Examples

use ruma_events_macros::event_enum;

event_enum! {
    name: AnyBarEvent, // `BarEvent` has to be a valid type at `::ruma_events::BarEvent`
    events: [
        "m.any.event",
        "m.other.event",
    ]
}