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

#1121 in Rust patterns

Download history 299/week @ 2024-07-21 432/week @ 2024-07-28 360/week @ 2024-08-04 362/week @ 2024-08-11 375/week @ 2024-08-18 422/week @ 2024-08-25 297/week @ 2024-09-01 317/week @ 2024-09-08 345/week @ 2024-09-15 560/week @ 2024-09-22 631/week @ 2024-09-29 287/week @ 2024-10-06 416/week @ 2024-10-13 771/week @ 2024-10-20 575/week @ 2024-10-27 335/week @ 2024-11-03

2,118 downloads per month
Used in 9 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