Blyx v0.1.0-alpha is here! Read the release notes ->

Chapter 6

Structs & Enums

A struct, or structure, is a custom data type that lets you package together and name multiple related values.

struct User {
    username: String,
    active: bool,
}

enum Message {
    Quit,
    Move { x: i32, y: i32 },
}
← Previous
Ownership & Memory
Next →
Pattern Matching