Skip to main content

Message

Derive Macro Message 

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

Derives the Message trait.

This macro accepts an optional reply attribute to specify the reply type for the message. When reply is specified, the receipt becomes a Response and the resolver a Request.

ยงExample

#[derive(Message)]
struct SimpleMessage;

#[derive(Message)]
#[msg(reply = u32)]
struct MessageWithOutput;