#macro #error #type #enum

quick-error

A macro which makes error types pleasant to write

13 releases (5 stable)

1.2.2 May 26, 2018
1.2.1 Sep 6, 2017
1.2.0 Apr 24, 2017
1.1.0 Jun 4, 2016
0.1.4 Oct 17, 2015

#6 in Rust patterns

Download history 35166/week @ 2018-09-19 37455/week @ 2018-09-26 38272/week @ 2018-10-03 38423/week @ 2018-10-10 42987/week @ 2018-10-17 38426/week @ 2018-10-24 45603/week @ 2018-10-31 43087/week @ 2018-11-07 46340/week @ 2018-11-14 44144/week @ 2018-11-21 40545/week @ 2018-11-28 47356/week @ 2018-12-05 45559/week @ 2018-12-12

102,151 downloads per month
Used in 1,099 crates (203 directly)

MIT/Apache

49KB
925 lines

Quick Error

Status

production-ready

Documentation

http://tailhook.github.io/quick-error/

A macro which makes error types pleasant to write.

Features:

  • Define enum type with arbitrary parameters

  • Concise notation of Display and Error traits

  • Full control of Display and Error trait implementation

  • Any number of From traits

  • Support for all enum-variants Unit, Tuple and Struct

Here is the comprehensive example:

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

No runtime deps