Skip to main content

MessageResponse

Derive Macro MessageResponse 

Source
#[derive(MessageResponse)]
Expand description

Derive the MessageResponse trait for a struct or enum.

This implements the default response handling, which sends the value back through an oneshot channel to the sender of the message.

§Examples

use acktor_derive::MessageResponse;

#[derive(MessageResponse)]
struct Sum(i64);

#[derive(Message)]
#[result_type(Sum)]
struct Add(i64, i64);