I’m developing software (with the fictitious crate name “ray”) that will provide utility code and a simpler facade to some of the modules in the std library. To keep everything tidy, I’ve been mirroring the std library module structure, for example:
Of course, this would cause naming clashes with the std lib when used in client code, and I don’t want to force users to explicitly state
ray:: on every usage or force them to rename on import with
use ... as. Am I correct in concluding that you can’t re-export these modules at the root and at the same time rename the module using the
as keyword like so?..:
pub use ray::env as envr
Also, with regard to the module names, is there any convention for this use case where, for example, you’d want to add a prefix or suffix to the module name to imply that it’s an extension to an existing module by, for example, suffixing with a fairly common
x for extension?