Module in other file
- mod
- pub
fn main() { println!("in main"); // crate::tools::private_helper(); // private function tools::public_helper(); crate::tools::public_helper(); } mod tools;
#![allow(unused)] fn main() { 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