pub trait AppWorld: Sized { type Message; // Required method fn msg(&mut self, message: Self::Message); }
Defines how messages that indicate that something has happened get sent to the World.
Indicates that something has happened.
#[allow(unused)] enum MyMessageType { IncreaseClickCounter, SetLastPausedAt(SystemTime) }
Send a message to the state object. This will usually lead to a state update