You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using certain widgets (e.g. Button) adds a Clone requirement on Message. As far as I can tell you can only have one Message type for your application, and Messages seem to be the way to pass async data around. This combination can be a little restrictive. Is there some way of structuring my Messages to avoid the clone requirement? Or should I just be sticking everything inside an Arc and not worrying about it?
The text was updated successfully, but these errors were encountered:
You can decouple the required variants that need to be Clone in your current Message into another enum that is Clone, use that Message for your widgets, convert the Widget into an Element with that cloneable message, then use Element::map to convert the cloneable Message into the non-clone Message.
You can check this out to see what the code for that would look like.
On Tue, 9 Feb 2021 at 05:56, Eucladia ***@***.***> wrote:
You can decouple the required variants that need to be Clone in your
current Message into another enum that is Clone, use that Message for
your widgets, convert the Widget into an Element with that cloneable
message, then use Element::map to convert the decoupled Message into the
non-clone Message.
You can check this
<#155 (comment)> out to
see what the code for that would look like.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#733 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOYQXKUJDQ44ZIGRVXWOYDS6AJUPANCNFSM4XIHS5HQ>
.
Using certain widgets (e.g. Button) adds a Clone requirement on Message. As far as I can tell you can only have one Message type for your application, and Messages seem to be the way to pass async data around. This combination can be a little restrictive. Is there some way of structuring my Messages to avoid the clone requirement? Or should I just be sticking everything inside an Arc and not worrying about it?
The text was updated successfully, but these errors were encountered: