A structure (or record) is a composite data structure made of several fields in sequence. In Rust, the fields of a structure are typed. They may have identical or different types.
There exist two types of structures in Rust:
The regular struct that uses named fields.
The tuple struct that uses a
tuplenotation and uses unnamed fields.