Update contents for ch00-10

pull/630/head
stevenlele 2 years ago
parent 77bc00bf3d
commit f75ad6909a

@ -2,7 +2,7 @@
[Rust 程序设计语言](title-page.md) [Rust 程序设计语言](title-page.md)
[前言](foreword.md) [前言](foreword.md)
[](ch00-00-introduction.md) [介](ch00-00-introduction.md)
## 入门指南 ## 入门指南
@ -11,7 +11,7 @@
- [Hello, World!](ch01-02-hello-world.md) - [Hello, World!](ch01-02-hello-world.md)
- [Hello, Cargo!](ch01-03-hello-cargo.md) - [Hello, Cargo!](ch01-03-hello-cargo.md)
- [猜猜看游戏教程](ch02-00-guessing-game-tutorial.md) - [写个猜数字游戏](ch02-00-guessing-game-tutorial.md)
- [常见编程概念](ch03-00-common-programming-concepts.md) - [常见编程概念](ch03-00-common-programming-concepts.md)
- [变量与可变性](ch03-01-variables-and-mutability.md) - [变量与可变性](ch03-01-variables-and-mutability.md)
@ -25,39 +25,39 @@
- [引用与借用](ch04-02-references-and-borrowing.md) - [引用与借用](ch04-02-references-and-borrowing.md)
- [Slice 类型](ch04-03-slices.md) - [Slice 类型](ch04-03-slices.md)
- [使用结构体组织相关联的数据](ch05-00-structs.md) - [使用结构体组织相关联的数据](ch05-00-structs.md)
- [定义并实例化结构体](ch05-01-defining-structs.md) - [结构体的定义和实例化](ch05-01-defining-structs.md)
- [一个使用结构体示例程序](ch05-02-example-structs.md) - [结构体示例程序](ch05-02-example-structs.md)
- [方法语法](ch05-03-method-syntax.md) - [方法语法](ch05-03-method-syntax.md)
- [枚举模式匹配](ch06-00-enums.md) - [枚举模式匹配](ch06-00-enums.md)
- [定义枚举](ch06-01-defining-an-enum.md) - [枚举的定义](ch06-01-defining-an-enum.md)
- [`match` 控制流运算符](ch06-02-match.md) - [`match` 控制流结构](ch06-02-match.md)
- [`if let` 简洁控制流](ch06-03-if-let.md) - [`if let` 简洁控制流](ch06-03-if-let.md)
## 基本 Rust 技能 ## 基本 Rust 技能
- [使用包、Crate 和模块管理不断增长的项目](ch07-00-managing-growing-projects-with-packages-crates-and-modules.md) - [使用包、Crate 和模块管理不断增长的项目](ch07-00-managing-growing-projects-with-packages-crates-and-modules.md)
- [包和 crate](ch07-01-packages-and-crates.md) - [包和 Crate](ch07-01-packages-and-crates.md)
- [定义模块来控制作用域与私有性](ch07-02-defining-modules-to-control-scope-and-privacy.md) - [定义模块来控制作用域与私有性](ch07-02-defining-modules-to-control-scope-and-privacy.md)
- [路径用于引用模块树中的项](ch07-03-paths-for-referring-to-an-item-in-the-module-tree.md) - [引用模块项目的路径](ch07-03-paths-for-referring-to-an-item-in-the-module-tree.md)
- [使用 `use` 关键字将名称引入作用域](ch07-04-bringing-paths-into-scope-with-the-use-keyword.md) - [使用 `use` 关键字将路径引入作用域](ch07-04-bringing-paths-into-scope-with-the-use-keyword.md)
- [将模块分割进不同文件](ch07-05-separating-modules-into-different-files.md) - [将模块拆分成多个文件](ch07-05-separating-modules-into-different-files.md)
- [常见集合](ch08-00-common-collections.md) - [常见集合](ch08-00-common-collections.md)
- [使用可变长数组(Vector)存储一列值](ch08-01-vectors.md) - [使用 Vector 储存列表](ch08-01-vectors.md)
- [使用字符串(String)存储UTF-8编码的文本](ch08-02-strings.md) - [使用字符串储存 UTF-8 编码的文本](ch08-02-strings.md)
- [在哈希映射中存储键和关联值](ch08-03-hash-maps.md) - [使用 Hash Map 储存键值对](ch08-03-hash-maps.md)
- [错误处理](ch09-00-error-handling.md) - [错误处理](ch09-00-error-handling.md)
- [`panic!` 与不可恢复的错误](ch09-01-unrecoverable-errors-with-panic.md) - [用 `panic!` 处理不可恢复的错误](ch09-01-unrecoverable-errors-with-panic.md)
- [`Result` 与可恢复的错误](ch09-02-recoverable-errors-with-result.md) - [用 `Result` 处理可恢复的错误](ch09-02-recoverable-errors-with-result.md)
- [`panic!` 还是不 `panic!`](ch09-03-to-panic-or-not-to-panic.md) - [要不要 `panic!`](ch09-03-to-panic-or-not-to-panic.md)
- [泛型、trait 与生命周期](ch10-00-generics.md) - [泛型、Trait 和生命周期](ch10-00-generics.md)
- [泛型数据类型](ch10-01-syntax.md) - [泛型数据类型](ch10-01-syntax.md)
- [trait定义共享的行为](ch10-02-traits.md) - [Trait定义共同行为](ch10-02-traits.md)
- [生命周期与引用有效性](ch10-03-lifetime-syntax.md) - [生命周期确保引用有效](ch10-03-lifetime-syntax.md)
- [编写自动化测试](ch11-00-testing.md) - [编写自动化测试](ch11-00-testing.md)
- [如何编写测试](ch11-01-writing-tests.md) - [如何编写测试](ch11-01-writing-tests.md)

@ -2,7 +2,7 @@
[Rust 程序设计语言](title-page.md) [Rust 程序设计语言](title-page.md)
[前言](foreword.md) [前言](foreword.md)
[](ch00-00-introduction.md) [介](ch00-00-introduction.md)
## 入门指南 ## 入门指南
@ -25,39 +25,39 @@
- [引用与借用](ch04-02-references-and-borrowing.md) - [引用与借用](ch04-02-references-and-borrowing.md)
- [Slice 类型](ch04-03-slices.md) - [Slice 类型](ch04-03-slices.md)
- [使用结构体组织相关联的数据](ch05-00-structs.md) - [使用结构体组织相关联的数据](ch05-00-structs.md)
- [定义并实例化结构体](ch05-01-defining-structs.md) - [结构体的定义和实例化](ch05-01-defining-structs.md)
- [一个使用结构体示例程序](ch05-02-example-structs.md) - [结构体示例程序](ch05-02-example-structs.md)
- [方法语法](ch05-03-method-syntax.md) - [方法语法](ch05-03-method-syntax.md)
- [枚举模式匹配](ch06-00-enums.md) - [枚举模式匹配](ch06-00-enums.md)
- [定义枚举](ch06-01-defining-an-enum.md) - [枚举的定义](ch06-01-defining-an-enum.md)
- [`match` 控制流运算符](ch06-02-match.md) - [`match` 控制流结构](ch06-02-match.md)
- [`if let` 简洁控制流](ch06-03-if-let.md) - [`if let` 简洁控制流](ch06-03-if-let.md)
## 基本 Rust 技能 ## 基本 Rust 技能
- [使用包、Crate 和模块管理不断增长的项目](ch07-00-managing-growing-projects-with-packages-crates-and-modules.md) - [使用包、Crate 和模块管理不断增长的项目](ch07-00-managing-growing-projects-with-packages-crates-and-modules.md)
- [包和 crate](ch07-01-packages-and-crates.md) - [包和 Crate](ch07-01-packages-and-crates.md)
- [定义模块来控制作用域与私有性](ch07-02-defining-modules-to-control-scope-and-privacy.md) - [定义模块来控制作用域与私有性](ch07-02-defining-modules-to-control-scope-and-privacy.md)
- [路径用于引用模块树中的项](ch07-03-paths-for-referring-to-an-item-in-the-module-tree.md) - [引用模块项目的路径](ch07-03-paths-for-referring-to-an-item-in-the-module-tree.md)
- [使用 `use` 关键字将名称引入作用域](ch07-04-bringing-paths-into-scope-with-the-use-keyword.md) - [使用 `use` 关键字将路径引入作用域](ch07-04-bringing-paths-into-scope-with-the-use-keyword.md)
- [将模块分割进不同文件](ch07-05-separating-modules-into-different-files.md) - [将模块拆分成多个文件](ch07-05-separating-modules-into-different-files.md)
- [常见集合](ch08-00-common-collections.md) - [常见集合](ch08-00-common-collections.md)
- [使用可变长数组(Vector)存储一列值](ch08-01-vectors.md) - [使用 Vector 储存列表](ch08-01-vectors.md)
- [使用字符串(String)存储UTF-8编码的文本](ch08-02-strings.md) - [使用字符串储存 UTF-8 编码的文本](ch08-02-strings.md)
- [在哈希映射中存储键和关联值](ch08-03-hash-maps.md) - [使用 Hash Map 储存键值对](ch08-03-hash-maps.md)
- [错误处理](ch09-00-error-handling.md) - [错误处理](ch09-00-error-handling.md)
- [`panic!` 与不可恢复的错误](ch09-01-unrecoverable-errors-with-panic.md) - [用 `panic!` 处理不可恢复的错误](ch09-01-unrecoverable-errors-with-panic.md)
- [`Result` 与可恢复的错误](ch09-02-recoverable-errors-with-result.md) - [用 `Result` 处理可恢复的错误](ch09-02-recoverable-errors-with-result.md)
- [`panic!` 还是不 `panic!`](ch09-03-to-panic-or-not-to-panic.md) - [要不要 `panic!`](ch09-03-to-panic-or-not-to-panic.md)
- [泛型、trait 与生命周期](ch10-00-generics.md) - [泛型、Trait 和生命周期](ch10-00-generics.md)
- [泛型数据类型](ch10-01-syntax.md) - [泛型数据类型](ch10-01-syntax.md)
- [trait定义共享的行为](ch10-02-traits.md) - [Trait定义共同行为](ch10-02-traits.md)
- [生命周期与引用有效性](ch10-03-lifetime-syntax.md) - [生命周期确保引用有效](ch10-03-lifetime-syntax.md)
- [编写自动化测试](ch11-00-testing.md) - [编写自动化测试](ch11-00-testing.md)
- [如何编写测试](ch11-01-writing-tests.md) - [如何编写测试](ch11-01-writing-tests.md)

@ -1,4 +1,4 @@
## 定义并实例化结构体 ## 结构体的定义和实例化
> [ch05-01-defining-structs.md](https://github.com/rust-lang/book/blob/main/src/ch05-01-defining-structs.md) > [ch05-01-defining-structs.md](https://github.com/rust-lang/book/blob/main/src/ch05-01-defining-structs.md)
> <br> > <br>

@ -1,4 +1,4 @@
## 一个使用结构体示例程序 ## 结构体示例程序
> [ch05-02-example-structs.md](https://github.com/rust-lang/book/blob/main/src/ch05-02-example-structs.md) > [ch05-02-example-structs.md](https://github.com/rust-lang/book/blob/main/src/ch05-02-example-structs.md)
> <br> > <br>

@ -1,4 +1,4 @@
## 定义枚举 ## 枚举的定义
> [ch06-01-defining-an-enum.md](https://github.com/rust-lang/book/blob/main/src/ch06-01-defining-an-enum.md) > [ch06-01-defining-an-enum.md](https://github.com/rust-lang/book/blob/main/src/ch06-01-defining-an-enum.md)
> <br> > <br>

@ -1,4 +1,4 @@
## `match` 控制流运算符 ## `match` 控制流结构
> [ch06-02-match.md](https://github.com/rust-lang/book/blob/main/src/ch06-02-match.md) > [ch06-02-match.md](https://github.com/rust-lang/book/blob/main/src/ch06-02-match.md)
> <br> > <br>

@ -1,4 +1,4 @@
## `if let`控制流 ## `if let`控制流
> [ch06-03-if-let.md](https://github.com/rust-lang/book/blob/main/src/ch06-03-if-let.md) > [ch06-03-if-let.md](https://github.com/rust-lang/book/blob/main/src/ch06-03-if-let.md)
> <br> > <br>

@ -1,4 +1,4 @@
# 使用包、Crate和模块管理不断增长的项目 # 使用包、Crate 和模块管理不断增长的项目
> [ch07-00-managing-growing-projects-with-packages-crates-and-modules.md](https://github.com/rust-lang/book/blob/main/src/ch07-00-managing-growing-projects-with-packages-crates-and-modules.md) > [ch07-00-managing-growing-projects-with-packages-crates-and-modules.md](https://github.com/rust-lang/book/blob/main/src/ch07-00-managing-growing-projects-with-packages-crates-and-modules.md)
> <br> > <br>

@ -1,4 +1,4 @@
## 包和 crate ## 包和 Crate
> [ch07-01-packages-and-crates.md](https://github.com/rust-lang/book/blob/main/src/ch07-01-packages-and-crates.md) > [ch07-01-packages-and-crates.md](https://github.com/rust-lang/book/blob/main/src/ch07-01-packages-and-crates.md)
> <br> > <br>

@ -1,4 +1,4 @@
## 路径用于引用模块树中的项 ## 引用模块项目的路径
> [ch07-03-paths-for-referring-to-an-item-in-the-module-tree.md](https://github.com/rust-lang/book/blob/main/src/ch07-03-paths-for-referring-to-an-item-in-the-module-tree.md) > <br> > [ch07-03-paths-for-referring-to-an-item-in-the-module-tree.md](https://github.com/rust-lang/book/blob/main/src/ch07-03-paths-for-referring-to-an-item-in-the-module-tree.md) > <br>
> commit 9c0fa2714859738ff73cbbb829592e4c037d7e46 > commit 9c0fa2714859738ff73cbbb829592e4c037d7e46

@ -1,4 +1,4 @@
## 使用 `use` 关键字将名称引入作用域 ## 使用 `use` 关键字将路径引入作用域
> [ch07-04-bringing-paths-into-scope-with-the-use-keyword.md](https://github.com/rust-lang/book/blob/main/src/ch07-04-bringing-paths-into-scope-with-the-use-keyword.md) > [ch07-04-bringing-paths-into-scope-with-the-use-keyword.md](https://github.com/rust-lang/book/blob/main/src/ch07-04-bringing-paths-into-scope-with-the-use-keyword.md)
> <br> > <br>

@ -1,4 +1,4 @@
## 将模块分割进不同文件 ## 将模块拆分成多个文件
> [ch07-05-separating-modules-into-different-files.md](https://github.com/rust-lang/book/blob/main/src/ch07-05-separating-modules-into-different-files.md) > [ch07-05-separating-modules-into-different-files.md](https://github.com/rust-lang/book/blob/main/src/ch07-05-separating-modules-into-different-files.md)
> <br> > <br>

@ -1,4 +1,4 @@
## vector 用来储存一系列的值 ## 使用 Vector 储存列表
> [ch08-01-vectors.md](https://github.com/rust-lang/book/blob/main/src/ch08-01-vectors.md) > [ch08-01-vectors.md](https://github.com/rust-lang/book/blob/main/src/ch08-01-vectors.md)
> <br> > <br>

@ -1,4 +1,4 @@
## 使用字符串储 UTF-8 编码的文本 ## 使用字符串储 UTF-8 编码的文本
> [ch08-02-strings.md](https://github.com/rust-lang/book/blob/main/src/ch08-02-strings.md) > [ch08-02-strings.md](https://github.com/rust-lang/book/blob/main/src/ch08-02-strings.md)
> <br> > <br>

@ -1,4 +1,4 @@
## 哈希 map 储存键值对 ## 使用 Hash Map 储存键值对
> [ch08-03-hash-maps.md](https://github.com/rust-lang/book/blob/main/src/ch08-03-hash-maps.md) > [ch08-03-hash-maps.md](https://github.com/rust-lang/book/blob/main/src/ch08-03-hash-maps.md)
> <br> > <br>

@ -1,4 +1,4 @@
## `panic!`不可恢复的错误 ## `panic!` 处理不可恢复的错误
> [ch09-01-unrecoverable-errors-with-panic.md](https://github.com/rust-lang/book/blob/main/src/ch09-01-unrecoverable-errors-with-panic.md) > [ch09-01-unrecoverable-errors-with-panic.md](https://github.com/rust-lang/book/blob/main/src/ch09-01-unrecoverable-errors-with-panic.md)
> <br> > <br>

@ -1,4 +1,4 @@
## `Result`可恢复的错误 ## `Result` 处理可恢复的错误
> [ch09-02-recoverable-errors-with-result.md](https://github.com/rust-lang/book/blob/main/src/ch09-02-recoverable-errors-with-result.md) > [ch09-02-recoverable-errors-with-result.md](https://github.com/rust-lang/book/blob/main/src/ch09-02-recoverable-errors-with-result.md)
> <br> > <br>

@ -1,4 +1,4 @@
## `panic!` 还是不 `panic!` ## 要不要 `panic!`
> [ch09-03-to-panic-or-not-to-panic.md](https://github.com/rust-lang/book/blob/main/src/ch09-03-to-panic-or-not-to-panic.md) > [ch09-03-to-panic-or-not-to-panic.md](https://github.com/rust-lang/book/blob/main/src/ch09-03-to-panic-or-not-to-panic.md)
> <br> > <br>

@ -1,4 +1,4 @@
# 泛型、trait 和生命周期 # 泛型、Trait 和生命周期
> [ch10-00-generics.md](https://github.com/rust-lang/book/blob/main/src/ch10-00-generics.md) > [ch10-00-generics.md](https://github.com/rust-lang/book/blob/main/src/ch10-00-generics.md)
> <br> > <br>

@ -1,4 +1,4 @@
## trait定义共享的行为 ## Trait定义共同行为
> [ch10-02-traits.md](https://github.com/rust-lang/book/blob/main/src/ch10-02-traits.md) > [ch10-02-traits.md](https://github.com/rust-lang/book/blob/main/src/ch10-02-traits.md)
> <br> > <br>

@ -1,4 +1,4 @@
## 生命周期与引用有效性 ## 生命周期确保引用有效
> [ch10-03-lifetime-syntax.md](https://github.com/rust-lang/book/blob/main/src/ch10-03-lifetime-syntax.md) > [ch10-03-lifetime-syntax.md](https://github.com/rust-lang/book/blob/main/src/ch10-03-lifetime-syntax.md)
> <br> > <br>

Loading…
Cancel
Save