Force Application::Message to implement Clone
A `Message` should represent an application event (e.g. user interactions, command results, subscription results...). Therefore, it should always consist of pure, cloneable data.
This commit is contained in:
parent
4abaee8b23
commit
5df2a92f28
4 changed files with 7 additions and 4 deletions
|
|
@ -11,7 +11,7 @@ pub trait Program: Sized {
|
|||
type Renderer: Renderer;
|
||||
|
||||
/// The type of __messages__ your [`Program`] will produce.
|
||||
type Message: std::fmt::Debug + Send;
|
||||
type Message: std::fmt::Debug + Clone + Send;
|
||||
|
||||
/// The type of [`Clipboard`] your [`Program`] will use.
|
||||
type Clipboard: Clipboard;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue