#[derive(MultiSendMessage)]
{
// Attributes available to this derive:
#[multi_send_message_derive]
#[multi_send_input_derive]
}
Expand description
Derives two enums, whose names are based on this struct by appending
Message
and Input
. Each enum has a case for each Sender
or
AsyncSender
in this struct. The Message
enum contains the raw message
being sent, which is X
for Sender<X>
and MessageWithCallback<X, Y>
for AsyncSender<X, Y>
. The Input
enum contains the same for Sender
but
only the input, X
for AsyncSender<X, Y>
.
Additionally, this struct can then be used to .send
using the derived
Message
enum. This is useful for packaging a multi-sender as a singular
Sender
that can then be embedded into another multi-sender. The Input
enum is useful for capturing messages for testing purposes.