Keyword pub

source
Expand description

Make an item visible to others.

The keyword pub makes any module, function, or data structure accessible from inside of external modules. The pub keyword may also be used in a use declaration to re-export an identifier from a namespace.

For more information on the pub keyword, please see the visibility section of the reference and for some examples, see Rust by Example.