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 the oneshot channel to the caller.

§Examples

use acktor_derive::MessageResponse;

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

#[derive(MessageResponse)]
enum Status {
    Ok,
    Error(String),
}