Skip to content

Ways around the Clone requirement on Message? #1208

Answered by Eucladia
anderslanglands asked this question in Q&A
Discussion options

You must be logged in to vote

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.

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by hecrj
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
3 participants
Converted from issue

This discussion was converted from issue #733 on January 20, 2022 07:50.