resume_generator/phone.rs
1crate::ix!();
2
3#[derive(Debug)]
4pub struct PhoneNumber(String);
5
6impl PhoneNumber {
7 pub fn new(phone: String) -> Self {
8 Self(phone)
9 }
10
11 pub fn number(&self) -> &str {
12 &self.0
13 }
14}
15
16impl fmt::Display for PhoneNumber {
17 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
18 write!(f, "{}", self.0)
19 }
20}