actix-derive
actix-derive copied to clipboard
Using `()` as the default Message result type
What about using ()
as the default result type? Currently I need to use a lot of boilerplate code with the rtype
attribute, like this:
#[derive(Message, Debug)]
#[rtype(result = "()")]
pub struct SomeMessage {
pub name: String,
}
There's an argument that using a default value and allowing the [rtype=...]
attribute to be omitted would make code less obvious, especially if Message
is hidden in a bigger list of derives.