Some Concepts in Rust 发表于 2022-11-08 更新于 2022-11-13 未来会写很多 Rust,这里记录一些重要的概念备查 For Rust中的for循环 123for x in 1..10 { // ...} 等价于: 1234let mut iter = (1..10).into_iter();while let Some(x) = iter.next() { // ...} Ownership Lifetime Clone & Copy dyn trait Box, Rc, Arc Send & Sync Closure (Fn, FnMut, FnOnce) Iter Cell & RefCell async