Structs

Custom types with named fields.

struct

Define the shape then create a value with fields.

fn main() {
    let p = { hp: 100, score: 0 }
    print(p.hp)
}

Output

100