5 releases (3 breaking)

0.4.1 Mar 19, 2023
0.4.0 Feb 18, 2023
0.3.0 Oct 2, 2022
0.2.0 Nov 23, 2019
0.1.0 Nov 3, 2019

#660 in Rust patterns

Download history 327/week @ 2023-11-24 291/week @ 2023-12-01 274/week @ 2023-12-08 399/week @ 2023-12-15 200/week @ 2023-12-22 143/week @ 2023-12-29 207/week @ 2024-01-05 294/week @ 2024-01-12 299/week @ 2024-01-19 325/week @ 2024-01-26 295/week @ 2024-02-02 291/week @ 2024-02-09 345/week @ 2024-02-16 279/week @ 2024-02-23 315/week @ 2024-03-01 163/week @ 2024-03-08

1,159 downloads per month
Used in 8 crates

MIT license

7KB
50 lines

error-iter

Crates.io Documentation GitHub actions GitHub activity GitHub Sponsors unsafe forbidden

Use Error::sources on stable Rust.

MSRV

Supports Rust 1.37.0 and higher.

Compiles on Rust 1.31.0, but does not return the tail source. (Tests fail on anything less than 1.37.0.)

What is this?

Error::sources is incredibly useful for providing error context in Rust applications. For motivation, see RFC 2504. This iterator is available in nightly compilers with #58520 tracking stabilization.

This crate does not attempt to be 100% compatible with the stabilization effort, but does want to provide very similar functionality to stable Rust.

Show me

cargo run --example simple

No runtime deps