1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
//! # rust_modules //! `rust_modules` is my studying rust modules. pub fn item() {} pub mod aaa { pub fn item() {} pub mod b { pub fn item() {} } } pub use aaa::b; pub mod a; /// Greets to the name given. /// /// # Examples /// /// ``` /// let name = "John Doe"; /// /// assert_eq!(rust_modules::greet("John Doe"), "Hello, John Doe!"); /// ``` pub fn greet(name: &str) -> String { format!("Hello, {}!", name) }