Rust 有一个用 const 关键字定义常量的方法: ... static. Rust 以静态量的方式提供了类似“全局变量”的功能。 ... static NAME: &'static str = "Steve"; ...
確定! 回上一頁