Crate failure[−][src]
An experimental new error-handling library.
The primary items exported by this library are:
Fail
: a new trait for custom error types in Rust.Error
: a wrapper aroundFail
types to make it easy to coalesce them at higher levels.
As a general rule, library authors should create their own error types and
implement Fail
for them, whereas application authors should primarily
deal with the Error
type. There are exceptions to this rule, though, in
both directions, and users should do whatever seems most appropriate to
their situation.
Macros
bail |
Exits a function early with an |
ensure |
Exits a function early with an |
format_err |
Constructs an |
Structs
Backtrace |
A |
Causes |
A iterator over the causes of a |
Compat |
A compatibility wrapper around an error type from this crate. |
Context |
An error with context around it. |
Error |
The |
SyncFailure |
Wrapper for |
Traits
Fail |
The |
ResultExt |
Extension methods for |
Functions
err_msg |
Constructs a |