wscript: structs, enums, methods

struct/enum declarations, impl blocks, and the implicit by-reference self.

rust
struct Player { name: string, hp: int }
enum Event { Quit, Key(char), Click { x: int, y: int } }

impl Player {
    fn heal(self, amount: int) { self.hp = self.hp + amount }
}

Enums carry data (unit, tuple, or struct variants). Methods live in impl blocks; self is implicit and always by reference (there is no &). Match on enums with pattern matching.