While it's possible to share the content between different event types in the usual case some event types have slightly different contents if they are sent out as a to-device event vs a room message event. The canonical example for this are key verification events where the to-device version has a transaction id field but the room message version uses event relationships for the same purpose. This patch makes it possible for to-device events to have different content structs. Type aliases are used where a common struct can be used.
ruma-events-macros
ruma-events-macros provides a procedural macro for easily generating event types for ruma-events.