Skip to content

Latest commit

 

History

History
25 lines (17 loc) · 606 Bytes

structs.md

File metadata and controls

25 lines (17 loc) · 606 Bytes

% Structs

There is a new edition of the book and this is an old link.

A struct is a custom data type that lets us name and package together multiple related values that make up a meaningful group.

struct User {
    username: String,
    email: String,
    sign_in_count: u64,
    active: bool,
}

Here are the relevant sections in the new and old books: