You can declare an associated constant in an impl: struct MyStruct { x: i32, y: i32, } impl MyStruct { const MY_STATIC: i32 = 123; } ...
確定! 回上一頁