[−][src]Macro dirmod_codegen::all
all!() { /* proc-macro */ }
Include all possible modules in the directory
Parameters
The following parameter statements can be joined by semicolons.
default $vis [use]
: All modules have$vis
visibility by default, where$vis
can be the standard visibilities likepub
,pub(crate)
, etc. The specialpriv
keyword can be used to indicate private visibility. If theuse
keyword is added behind the visibility, modules will remain private, and$vis use module::*;
statements would be appended. If this statement is not given,priv
is assumed for default.$vis [use] $name1, $name2, ...
: The specified modules have$vis
visibility, different from the default visibility. The format of$vis [use]
is identical to that indefault
.except $name1 $name2 ...
: The specified modules are excluded.
For simplicity, there is no special syntax to add doc comments.
To document modules, either use the //!
inner documentation
syntax within the module file, or use except
to exclude
declaration and declare them separately from the macro call.
Examples
ⓘThis example is not tested
all!();
ⓘThis example is not tested
all!(default pub(crate); pub foo);
ⓘThis example is not tested
all! { default pub(super); pub(crate) foo, bar; pub qux, corge; priv lorem; except ipsum; }