Skip to main content

Message

Derive Macro Message 

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

Derives the Message trait for a struct or enum.

The response type defaults to () and can be overridden with the #[response(Type)] attribute.

§Example

#[derive(Message)]
#[response(String)]
struct Greet(String);