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:
Héctor Ramón Jiménez 2021-07-13 21:15:07 +02:00
parent 4abaee8b23
commit 5df2a92f28
No known key found for this signature in database
GPG key ID: 44B88EB52AB1EE8D
4 changed files with 7 additions and 4 deletions

View file

@ -99,7 +99,7 @@ pub trait Application: Sized {
type Executor: Executor;
/// The type of __messages__ your [`Application`] will produce.
type Message: std::fmt::Debug + Send;
type Message: std::fmt::Debug + Clone + Send;
/// The data needed to initialize your [`Application`].
type Flags;