Rust 通过 match 关键字来提供模式匹配,用法和C 语言的的 switch 类似。 fn main() { ... let binary = match boolean {. // match 分支必须覆盖所有可能的值.
確定! 回上一頁