Tuple structs are named types holding ordered values accessed by index, defined with parentheses.
Tuple structs are named data structures that hold a sequence of values without named fields, defined using parentheses instead of braces.
struct WriteMessage(String);
struct ChangeColorMessage(i32, i32, i32);
let msg = WriteMessage("Hello".to_string());
let color = ChangeColorMessage(255, 0, 0);
Access fields by index (e.g., msg.0) or destructure them in patterns.
A tuple struct is a named container for a fixed list of values where you don't need to label each item. Think of it like a labeled box holding a specific order of items, such as a coordinate pair or an RGB color code. You use them when the order of data matters more than giving each piece a unique name.