Names and imports
helpers4 is one crate with one module per category. A deliberate consequence is that the same function name can exist in several modules when the operation makes sense for different kinds of data: merging them into one generic function would make the types less precise and the behavior harder to predict.
Names that exist in more than one module
Section titled “Names that exist in more than one module”Generated from the documented version, so it always matches it.
| Item | Modules |
|---|---|
parse | duration, env |
Importing
Section titled “Importing”Import through the module path, and do not glob-import a module (use helpers4::string::*;): the next name collision would then be yours to debug.
Resolving a conflict
Section titled “Resolving a conflict”When you need two helpers with the same name in one file, rename at the import site with as, suffixing the module name so the origin stays visible:
The same applies to a name that also exists in the standard library or in another crate you use.
