4.1 比较
01-比较 — Comprehensive Rust
1分钟内可阅读完
译文 · 基于 Comprehensive Rust
原文链接: https://google.github.io/comprehensive-rust/std-traits.html
本小节约需 1 小时。内容包括:
| 内容 | 时长 |
|---|---|
| 比较 | 5 分钟 |
| 运算符 | 5 分钟 |
From 与 Into | 5 分钟 |
| 强制转换 | 5 分钟 |
Read 与 Write | 5 分钟 |
Default 与结构体更新语法 | 5 分钟 |
| 练习:ROT13 | 30 分钟 |
与标准库类型一样,花时间查阅每个 trait 的文档。
本节较长。中途休息一下。
01-比较 — Comprehensive Rust
02-运算符 — Comprehensive Rust
03-From 与 Into — Comprehensive Rust
04-强制转换 — Comprehensive Rust
05-Read 与 Write — Comprehensive Rust
06-Default 与结构体更新语法 — Comprehensive Rust
练习:ROT13 — Comprehensive Rust