send_message

Function send_message 

Source
pub fn send_message<T>(message: &T, targets: impl IntoMessageTargets)
where T: MessageType,
Expand description

Sends the message to the given targets.

ยงExample

// Send a message with only a single target
send_message(&TestMessage { value: 42 }, MessageTarget::Myself);
// Send a message to multiple targets
send_message(&TestMessage { value: 42 }, [MessageTarget::Myself, MessageTarget::ChildByIndex(0)]);