Module defined in the main.rs file



examples/modules/inline-module/src/main.rs
fn main() {
    println!("in main");

    // crate::tools::private_helper(); // private function

    tools::public_helper();
    crate::tools::public_helper();
}


mod tools {
    fn private_helper() {
        println!("in tools::private_helper");
    }


    pub fn public_helper() {
        println!("in tools::public_helper");

        private_helper();
    }
}

in main
in tools::public_helper
in tools::private_helper
in tools::public_helper
in tools::private_helper