rust_modules/
lib.rs

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