Blyx v0.1.0-alpha: AI-Native Systems Language with Rust Runtime •View on GitHub

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 },
}
Ownership & MemoryPattern Matching