2 元组与数组

元组与数组 — Comprehensive Rust

译文 · 基于 Comprehensive Rust

原文链接: https://google.github.io/comprehensive-rust/tuples-and-arrays.html

2 元组与数组

本小节约需 35 分钟。内容包括:

内容时长
数组5 分钟
元组5 分钟
数组迭代3 分钟
模式与解构5 分钟
练习:嵌套数组15 分钟
  • 我们已经看过 Rust 中原始类型的用法。现在该开始构建新的复合类型了。

2.1 数组

01-数组 — Comprehensive Rust

2.2 元组

02-元组 — Comprehensive Rust

2.3 数组迭代

03-数组迭代 — Comprehensive Rust

2.4 模式与解构

04-模式与解构 — Comprehensive Rust

2.5 练习:嵌套数组

练习:嵌套数组 — Comprehensive Rust

最后修改 August 11, 2026: 更新 (70a5af133)