crosspostato da: https://lemmy.world/post/1916287
Hi everybody, I’m new to Rust.
So, I have a struct
Panelwhich contains a datawidgetwhich implements the traitWidgetI have to implement a function forPanelthat uses another function that requires a type that implementsWidget.I tried
Box<T>,Rc<T>,Box<dyn Widget,&T, but nothing, always compiler errors.How can I fix this?
You must log in or # to comment.

