1. 前言
  2. 第一部
  3. 基礎
    1. 安裝 Rust
    2. 第一個程式
    3. 變數與輸出
    4. 註解
    5. 算術運算子
    6. 運算子優先順序
    7. 比較運算子
    8. if
    9. 作用域
    10. else
    11. else if
    12. 邏輯運算子
    13. let mut
    14. 複合賦值運算子
    15. stdin
    16. parse
    17. 綜合練習
    18. loop + break
    19. while
    20. for + range
    21. 巢狀迴圈
    22. continue
    23. 型別(基礎)
    24. 型別(數字詳解)
    25. char
    26. 跳脫字元
    27. if 當表達式
  4. 函數、陣列與切片
    1. const
    2. shadowing
    3. 底線變數
    4. tuple
    5. {:?} Debug 格式
    6. 簡單函數
    7. 函數參數
    8. 函數回傳值
    9. early return
    10. 遞迴
    11. 陣列基礎
    12. 陣列走訪
    13. 切片 &[T]
    14. 切片作為參數
    15. 字串切片 &str
  5. Struct、Enum 與 Pattern Matching
    1. struct(named fields)
    2. tuple struct 與 unit struct
    3. enum(C-style)
    4. match C-style enum
    5. match 當表達式
    6. block 表達式
    7. enum 攜帶 tuple variant
    8. enum 攜帶 struct variant
    9. match 解構 tuple variant
    10. match 解構 struct variant
    11. field shorthand
    12. tuple pattern
    13. slice pattern
    14. 巢狀 pattern matching
    15. _ wildcard
    16. .. 忽略多個值
    17. range pattern
    18. 多個值 |
    19. @ 綁定
    20. match guard
    21. let 解構 tuple
    22. let 解構 struct
    23. for 迴圈解構
    24. 函數參數解構
    25. if let
    26. while let
    27. let else
    28. associated function
    29. method
    30. 大寫 Self
  6. 所有權與借用
    1. 所有權(鑰匙圈比喻)
    2. trait 簡介
    3. move 與 Clone
    4. Copy
    5. 借用 &
    6. 可變借用 &mut
    7. 借用規則
    8. self vs &self vs &mut self
    9. stack 與 heap
    10. String
    11. String vs &str
    12. Vec 基礎
    13. Vec 與所有權
  7. 泛型、Trait Bound 與生命週期
    1. 泛型函數
    2. 泛型 struct
    3. 泛型 enum
    4. turbofish 語法
    5. placeholder type _
    6. 型別別名
    7. 泛型 impl
    8. Option<T>
    9. Option 常用方法
    10. Result<T, E>
    11. ? 運算子
    12. 多個方法的 trait 與預設實作
    13. trait bound
    14. use 基礎
    15. Display trait
    16. 多個 trait bound 與 where
    17. impl Trait 語法
    18. 多參數 trait
    19. From<T> / Into<T>
    20. Drop
    21. Box<T>
    22. Rc<T>
    23. Deref
    24. Cell<T>
    25. RefCell<T>
    26. 生命週期基礎
    27. 生命週期省略規則
    28. 型別上的生命週期
    29. lifetime bound
    30. supertrait
    31. 常見的 derive trait
    32. associated type
    33. Cow<'a, B>
  8. 閉包與迭代器
    1. 函數指標
    2. 閉包用法展示
    3. 手動實作閉包
    4. 閉包種類的推斷
    5. FnOnce / FnMut / Fn
    6. move 閉包
    7. Option / Result 的閉包方法
    8. Iterator trait
    9. for 迴圈的真面目
    10. into_iter / iter_mut / iter
    11. 收集
    12. 聚合
    13. 組合與截取
    14. 轉換與過濾
    15. 惰性求值
  9. Cargo、Crate 與 Mod 系統
    1. Cargo 與 crates.io
    2. mod
    3. 檔案 mod
    4. pub 可見性
    5. use
    6. cargo test
    7. pub use
    8. orphan rule
    9. 文件註解
    10. cargo publish
  10. 附錄一
    1. 數字字面值格式
    2. && 和 || 的短路行為
    3. break 回傳值
    4. 多行字串 & raw string literal
    5. 格式化字串進階
    6. struct / enum 放在 fn 裡面
    7. struct update syntax
    8. ref pattern 與 match ergonomics
    9. panic! / todo! / unimplemented! / unreachable!
    10. let chains
    11. Rc 迴圈與 Weak
    12. fully qualified syntax
    13. DST 簡介
    14. extern crate
  11. 第二部
  12. 多執行緒
    1. 指標
    2. thread::spawn
    3. Send / Sync
    4. RefCell 在多執行緒
    5. Rc 在多執行緒
    6. Arc<T>
    7. atomic 型別
    8. Mutex<T>
    9. RwLock<T>
    10. poisoning
    11. mpsc
    12. 死鎖
    13. thread::scope 簡介
  13. 進階語言功能
    1. dyn Trait 基礎
    2. dyn compatibility
    3. const fn
    4. associated const
    5. const generics
    6. 預設參數
    7. 運算子重載
    8. 型別轉換 as
    9. enum discriminant
    10. attribute 總覽
    11. cfg! 巨集
    12. macro_rules!
    13. proc macro
    14. unsafe
    15. static 變數
    16. LazyLock
    17. extern blocks
    18. union
    19. never type !
  14. 進階標準庫
    1. AsRef<T> / AsMut<T>
    2. Ordering 與排序
    3. HashMap<K, V>
    4. HashSet<T>
    5. 其他集合簡介
    6. std::env / std::process
    7. std::path
    8. 字串方法
    9. I/O:stdin、檔案讀寫
    10. Error trait
    11. thiserror / anyhow 簡介
    12. catch_unwind
  15. 非同步
    1. 第一個 async 程式
    2. 為什麼需要 async
    3. async fn 回傳的是 Future
    4. async 是一種作用
    5. async block
    6. Future trait 與最陽春的 executor
    7. 手寫一個 Delay Future
    8. 用 .await 等待 Delay
    9. 手寫 join
    10. 用 Thread 與 Waker 喚醒 executor
    11. spawn 與 ready queue
    12. spawn 與 JoinHandle
    13. mio
    14. 手寫 reactor
    15. async fn 背後的狀態機
    16. 自我參照的 Future
    17. 為什麼 poll 需要 Pin
    18. Unpin
    19. pin!
    20. async 遞迴
    21. 回到 Tokio
    22. spawn_blocking
    23. join!
    24. Semaphore 與 backpressure
    25. mpsc
    26. oneshot、watch 與 broadcast
    27. AsyncRead 與 AsyncWrite
    28. select!
    29. async 的 Mutex、RwLock 與 Notify
    30. Stream
    31. JoinSet 與 FuturesUnordered
    32. graceful shutdown
    33. 測試 async 程式
    34. Tokio 以外的 runtime
  16. 附錄二
    1. 'a: 'b
    2. HRTB
    3. variance
    4. PhantomData 與 PhantomPinned
    5. GAT
    6. async 閉包
    7. use bound