在Rust 中列舉除了用來表示有限的選項外,也可以用來傳遞型態不同的參數,像 StringOrInt 一樣。 ... 若數字是1 就印出「數字是1」,以此類推match 2 { 1 => println!(
確定! 回上一頁