靜態的

static 關鍵字宣告瞭一個全域性靜態繫結,它可能是可變的。

static HELLO_WORLD: &'static str = "Hello, world!";

fn main() {
    println("{}", HELLO_WORLD);
}

這輸出

Hello, world!