Allowing use
to only import types from a module is something that is useful when:
- you have a platform and want to use it as a short namespace, such as
spark::Dialog
instead ofspark::controls::Dialog
; - you want to export public items from a certain module of the platform, but not, say, modules or functions, because they might conflict (for example, some modules may share a module of equivalent name
support
, used for organization only).
An example crate:
#[type_use]
pub use self::foo::*;
#[type_use]
pub use self::qux::*;