Skip to main content

Interface

Derive Macro Interface 

Source
#[derive(Interface)]
{
    // Attributes available to this derive:
    #[interface]
}
Expand description

Derives the Interface trait for an enum.

This only works un unnamed, single-value enum-fields that are envelopes. Anything else is rejected.

ยงExample

#[derive(Interface)]
enum MyInterface {
    MessageA(Envelope<u32>),
    MessageB(Envelope<String>),
}