语法 | 等价于 | 访问级别 |
---|---|---|
for item in collection |
for item in IntoIterator::into_iter(collection) |
拥有所有权,也就是for 语句结束之后,collection 已经无效 |
for item in &collection |
for item in collection.iter() |
只读,语句结束,collection 有效 |
for item in &mut collection |
for item in collection.iter_mut() |
读写,语句结束,collection 有效 |
-
Notifications
You must be signed in to change notification settings - Fork 0
0x1042/learnrust
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
some example for rust
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published