常量

结构体(记录)

// 常量以大写字母开头
struct BoldLine {}
impl BoldLine {
    const WIDTH: i8 = 10;
}

let line_width = BoldLine::WIDTH;
//line_width is 10  

//BoldLine::WIDTH = 5; //<-Error
println!("line_width is {line_width}");