Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
1fe126af
R
Rust
项目概览
int
/
Rust
大约 1 年 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
Rust
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1fe126af
编写于
9月 16, 2015
作者:
B
bors
浏览文件
操作
浏览文件
下载
差异文件
Auto merge of #28420 - christopherdumas:intergrate_error_burnstushi, r=steveklabnik
This was pointed out by @filsmick and @swatteau in #28412.
上级
0f1f5fc7
e66a1dcd
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
5 addition
and
6 deletion
+5
-6
src/doc/trpl/error-handling.md
src/doc/trpl/error-handling.md
+5
-6
未找到文件。
src/doc/trpl/error-handling.md
浏览文件 @
1fe126af
...
...
@@ -24,7 +24,7 @@ systems may want to jump around.
*
[
The Basics
](
#the-basics
)
*
[
Unwrapping explained
](
#unwrapping-explained
)
*
[
The `Option` type
](
#the-option-type
)
*
[
Composing `Option<T>` values
](
#composing-option
t
-values
)
*
[
Composing `Option<T>` values
](
#composing-option
<t>
-values)
*
[
The `Result` type
](
#the-result-type
)
*
[
Parsing integers
](
#parsing-integers
)
*
[
The `Result` type alias idiom
](
#the-result-type-alias-idiom
)
...
...
@@ -33,19 +33,19 @@ systems may want to jump around.
*
[
Composing `Option` and `Result`
](
#composing-option-and-result
)
*
[
The limits of combinators
](
#the-limits-of-combinators
)
*
[
Early returns
](
#early-returns
)
*
[
The `try!` macro
](
#the-try-macro
)
*
[
The `try!` macro
](
#the-try
!
-macro
)
*
[
Defining your own error type
](
#defining-your-own-error-type
)
*
[
Standard library traits used for error handling
](
#standard-library-traits-used-for-error-handling
)
*
[
The `Error` trait
](
#the-error-trait
)
*
[
The `From` trait
](
#the-from-trait
)
*
[
The real `try!` macro
](
#the-real-try-macro
)
*
[
The real `try!` macro
](
#the-real-try
!
-macro
)
*
[
Composing custom error types
](
#composing-custom-error-types
)
*
[
Advice for library writers
](
#advice-for-library-writers
)
*
[
Case study: A program to read population data
](
#case-study-a-program-to-read-population-data
)
*
[
Initial setup
](
#initial-setup
)
*
[
Argument parsing
](
#argument-parsing
)
*
[
Writing the logic
](
#writing-the-logic
)
*
[
Error handling with `Box<Error>`
](
#error-handling-with-box
error
)
*
[
Error handling with `Box<Error>`
](
#error-handling-with-box
<error>
)
*
[
Reading from stdin
](
#reading-from-stdin
)
*
[
Error handling with a custom type
](
#error-handling-with-a-custom-type
)
*
[
Adding functionality
](
#adding-functionality
)
...
...
@@ -122,8 +122,7 @@ types. Both of these types have a method called `unwrap` defined on them.
## The `Option` type
The
`Option`
type is
[
defined in the standard library][1
]:
The
`Option`
type is
[
defined in the standard library
][
5
]
:
```
rust
enum
Option
<
T
>
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录