basic/compound-type/struct #713
Replies: 4 comments 11 replies
-
那如果我想根据user1创建一个user2的实例,但还要保持user1的可用,应该怎么做呢 |
Beta Was this translation helpful? Give feedback.
7 replies
-
所有权的部分仅仅是username字段无法使用,user1其他字段可以使用;而且 println!("{}", user1) 报错也不是因为所有权问题,而是因为 |
Beta Was this translation helpful? Give feedback.
1 reply
-
单元结构体类似Java中的标记接口? |
Beta Was this translation helpful? Give feedback.
0 replies
-
作者大大,这个单元结构体的作用不大理解,可以用类似py或者go来举个例子嘛,不太清楚这个在什么地方用,小白刚刚入坑,太难了 |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
basic/compound-type/struct
https://course.rs/basic/compound-type/struct.html
Beta Was this translation helpful? Give feedback.
All reactions