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. |
Beta Was this translation helpful? Give feedback.
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. |
Beta Was this translation helpful? Give feedback.
-
Comming from Google, I had the same issue.
|
Beta Was this translation helpful? Give feedback.
You should be able to use
#[relm4::factory_prototype(pub)]
to make the generatedFactoryWidgets
struct 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.