Macro aversion::assign_message_ids [−][src]
assign_message_ids!() { /* proc-macro */ }
Expand description
Implement MessageId
for a bunch of types at once.
The assign_message_ids!
macro uses the following syntax:
assign_message_ids! {
Foo: 100,
Bar: 101,
Baz: 109,
}
This is equivalent to writing the following MessageId
implementations by hand:
impl MessageId for Foo { const MSG_ID: u16 = 100; } impl MessageId for Bar { const MSG_ID: u16 = 101; } impl MessageId for Baz { const MSG_ID: u16 = 109; }