• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

examples/H03-May-2022-4943

src/H03-May-2022-1,263886

.cargo-checksum.jsonH A D03-May-202289 11

.cargo_vcs_info.jsonH A D02-Jan-202074 65

.gitignoreH A D02-Jan-202028 43

.travis.ymlH A D02-Jan-20201.1 KiB3529

Cargo.lockH A D02-Jan-2020143 75

Cargo.tomlH A D02-Jan-2020985 2422

Cargo.toml.orig-cargoH A D02-Jan-2020464 1413

LICENSE-APACHEH A D02-Jan-202011.1 KiB203169

LICENSE-MITH A D02-Jan-20201 KiB2016

README.rstH A D02-Jan-20201.7 KiB6752

bulk.yamlH A D02-Jan-2020133 96

vagga.yamlH A D02-Jan-2020916 3729

README.rst

1===========
2Quick Error
3===========
4
5:Status: production-ready
6:Documentation: http://tailhook.github.io/quick-error/
7
8A macro which makes error types pleasant to write.
9
10Features:
11
12* Define enum type with arbitrary parameters
13* Concise notation of ``Display`` and ``Error`` traits
14* Full control of ``Display`` and ``Error`` trait implementation
15* Any number of ``From`` traits
16* Support for all enum-variants ``Unit``, ``Tuple`` and ``Struct``
17
18Here is the comprehensive example:
19
20.. code-block:: rust
21
22    quick_error! {
23        #[derive(Debug)]
24        pub enum IoWrapper {
25            Io(err: io::Error) {
26                from()
27                display("I/O error: {}", err)
28                cause(err)
29            }
30            Other(descr: &'static str) {
31                display("Error {}", descr)
32            }
33            IoAt { place: &'static str, err: io::Error } {
34                cause(err)
35                display(me) -> ("io error at {}: {}", place, err)
36                from(s: String) -> {
37                    place: "some string",
38                    err: io::Error::new(io::ErrorKind::Other, s)
39                }
40            }
41            Discard {
42                from(&'static str)
43            }
44        }
45    }
46
47=======
48License
49=======
50
51Licensed under either of
52
53 * Apache License, Version 2.0, (./LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
54 * MIT license (./LICENSE-MIT or http://opensource.org/licenses/MIT)
55
56at your option.
57
58------------
59Contribution
60------------
61
62Unless you explicitly state otherwise, any contribution intentionally
63submitted for inclusion in the work by you, as defined in the Apache-2.0
64license, shall be dual licensed as above, without any additional terms or
65conditions.
66
67