mirror of
https://github.com/KaiserY/trpl-zh-cn
synced 2025-04-19 19:28:06 +08:00
18 lines
331 B
Rust
18 lines
331 B
Rust
struct User {
|
|
active: bool,
|
|
username: String,
|
|
email: String,
|
|
sign_in_count: u64,
|
|
}
|
|
|
|
// ANCHOR: here
|
|
fn main() {
|
|
let user1 = User {
|
|
active: true,
|
|
username: String::from("someusername123"),
|
|
email: String::from("someone@example.com"),
|
|
sign_in_count: 1,
|
|
};
|
|
}
|
|
// ANCHOR_END: here
|