#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 22206/week @ 2018-05-06 28353/week @ 2018-05-13 30656/week @ 2018-05-20 28966/week @ 2018-05-27 35424/week @ 2018-06-03 33850/week @ 2018-06-10 31147/week @ 2018-06-17 32534/week @ 2018-06-24 33470/week @ 2018-07-01 32609/week @ 2018-07-08 34526/week @ 2018-07-15 37400/week @ 2018-07-22 29949/week @ 2018-07-29

102,151 downloads per month

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.

MIT/Apache-2.0 license
  • No runtime deps

Reverse deps