tutorial_1/customer/
mod.rs

1// here we also need to know, make a module public
2// it's inner variables like structs or functiosn will not become public automatically and iteratively
3pub struct Customer {
4    id: u64,
5    name: String,
6    email: String,
7}
8
9impl Customer {
10    /// # Example
11    /// ```
12    /// Customer::new(1, "customer name".to_string(), "customer_email@xxx.com")
13    /// ```
14    pub fn new(id: u64, name: String, email: String) -> Self {
15        Customer { id, name, email }
16    }
17}