Bird

Structs

Struct Declarations

Structs provide a way to group related variables and functions into a new user-defined type.

Struct Initialization

The compiler generates a constructor for each struct. Fields can be omitted from the constructor.

Methods

You can add methods to a struct

Self

You can access struct data by using the self keyword

Still here?

Check out the playground!