struct
A named type grouping named fields.
A struct defines a type with named, typed fields.
Loading interactive…
Examples
struct Book { title: String, pages: u32, price_cents: u64 }groups a title, a page count and a price under one type name.
See also