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 around Fail types to make it easy to coallesce 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

format_err

Construct an Error using the standard string interpolation syntax.

Structs

Backtrace

A Backtrace.

Compat

A compatibility wrapper around an error type from this crate.

Context

An error with context around it.

Error

The Error type, which can contain any failure.

SyncFailure

Wrapper for std errors to make them Sync.

Traits

Fail

The Fail trait.

ResultExt

Extension methods for Result.

Functions

err_msg

Construct a Fail type from a string.