enum IpAddr { V4, V6, } fn main() { let ip = IpAddr::V6; match ip { IpAddr::V4 => println!("Yes Ip Is V4"), _ => println!("No Ip is not V4"), } }