Struct

Structs are types that wrap values of other types, which are called its fields.

Structs that contain no values or only zero-sized types are also zero-sized; they only exist in the type system, but don't use any memory at runtime. Structs containing exactly one value are called newtypes. They are used to give an existing type a new meaning and/or new functionality.

Structs are equivalent to struct types in C and the Lisp family, and to record types of the ML family; they are sometimes called product types.

Struct fields are private by default and can have visibility modifiers.