pub trait Message:
Debug
+ Clone
+ Serialize
+ DeserializeOwned
+ Send
+ Sync
+ 'static { }Expand description
What one episode’s actors say to one another.
An episode carries one message type, and every actor in it sends and receives that type. A message is cloned for every recipient of a statement or a request, travels between actors on a multi-threaded runtime, and is written to the log and read back from it, which is what the bounds say. Implementing it takes one empty line:
#[derive(Debug, Clone, Serialize, Deserialize)]
struct Note(String);
impl Message for Note {}Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".