I'm writing a library, within which I want to use a module types containing Foo, Bar, and Baz. I would like Baz to remain internal to the library, but re-export the other two for using them outside the library. For organizational purposes, I want the exported symbols to live inside the same module, in contrast to re-exporting the individual symbols. In other words, I want to re-export a subset of the module. Is there a neat solution to do this?
I know about pub mod types;, but that re-exports the entire module and since the symbols are pub for usage within the library, this also includes Baz. There is also pub use types::{Foo, Bar};, which only exports the symbols I want, but then they are placed in the library namespace instead of the module.
typestotypes_internalthenmod types { pub use types_internal::{Foo, Bar} }