W3cubDocs

/Rust

Keyword pub

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.

© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/std/keyword.pub.html