private type FactoryWidgets in public interface
#159
|
Hello, so to be able to use it in But this causes a compiler error Can you suggest a solution? I am relatively new to Rust so it might be on a surface but I don't see it. |
Replies: 2 comments
|
You should be able to use Btw. this hasn't anything to do with Rust directly, but the macro generates the struct as not-public by default. And because the code generation is somewhat hidden, it's not easy to find this feature. It's documented in the book quite at the end, at least for the widget macro. |
|
Comming from Google, I had the same issue.
|
You should be able to use
#[relm4::factory_prototype(pub)]to make the generatedFactoryWidgetsstruct public.Btw. this hasn't anything to do with Rust directly, but the macro generates the struct as not-public by default. And because the code generation is somewhat hidden, it's not easy to find this feature. It's documented in the book quite at the end, at least for the widget macro.