2.1 Panic
01-Panic — Comprehensive Rust
1分钟内可阅读完
译文 · 基于 Comprehensive Rust
原文链接: https://google.github.io/comprehensive-rust/error-handling.html
本小节约需 55 分钟。内容包括:
| 内容 | 时长 |
|---|---|
| Panic | 3 分钟 |
Result | 5 分钟 |
| Try 运算符 | 5 分钟 |
| Try 类型转换 | 5 分钟 |
Error Trait | 5 分钟 |
thiserror | 5 分钟 |
anyhow | 5 分钟 |
练习:用 Result 重写 | 20 分钟 |
01-Panic — Comprehensive Rust
02-Result — Comprehensive Rust
03-Try 运算符 — Comprehensive Rust
04-Try 类型转换 — Comprehensive Rust
05-Error Trait — Comprehensive Rust
06-thiserror — Comprehensive Rust
07-anyhow — Comprehensive Rust
练习:用 Result 重写 — Comprehensive Rust