Macro ruma_macros::event_enum

source ·
event_enum!() { /* proc-macro */ }
Expand description

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.


use ruma_macros::event_enum;

event_enum! {
    enum ToDevice {

    enum State {

(The enum name has to be a valid identifier for <EventKind as Parse>::parse)