mod network {
    pub mod info {
        pub fn get_addr() {}
        pub fn get_port() {}
    }
    pub mod comm {
        pub fn connect() { println!("Connected."); }
        pub fn send() { println!("Sent data."); }
        pub fn receive() { println!("Received data."); }
        pub fn disconnect() { println!("Disconnected."); }
    }
}

// mod network {
//     mod info {
//         fn get_addr() {}
//         fn get_port() {}
//     }
//     mod comm {
//         fn connect() { println!("Connected."); }
//         fn send() { println!("Sent data."); }
//         fn receive() { println!("Received data."); }
//         fn disconnect() { println!("Disconnected."); }
//     }
// }

fn main() {
    // コメントアウトを解除するとコンパイルエラーになります。
    //connect();

    network::comm::connect();
    //crate::network::comm::connect();
    //self::network::comm::connect();
    network::comm::send();
    network::comm::receive();
    network::comm::disconnect();

    // use network::comm::{connect, send, receive, disconnect};
    // connect();
    // send();
    // receive();
    // disconnect();
}