summaryrefslogtreecommitdiffstats
path: root/third_party/rust/quick-error/README.rst
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:47:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:47:29 +0000
commit0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d (patch)
treea31f07c9bcca9d56ce61e9a1ffd30ef350d513aa /third_party/rust/quick-error/README.rst
parentInitial commit. (diff)
downloadfirefox-esr-0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d.tar.xz
firefox-esr-0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d.zip
Adding upstream version 115.8.0esr.upstream/115.8.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/rust/quick-error/README.rst')
-rw-r--r--third_party/rust/quick-error/README.rst66
1 files changed, 66 insertions, 0 deletions
diff --git a/third_party/rust/quick-error/README.rst b/third_party/rust/quick-error/README.rst
new file mode 100644
index 0000000000..e54c055c4e
--- /dev/null
+++ b/third_party/rust/quick-error/README.rst
@@ -0,0 +1,66 @@
+===========
+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:
+
+.. code-block:: rust
+
+ quick_error! {
+ #[derive(Debug)]
+ pub enum IoWrapper {
+ Io(err: io::Error) {
+ from()
+ display("I/O error: {}", err)
+ cause(err)
+ }
+ Other(descr: &'static str) {
+ display("Error {}", descr)
+ }
+ IoAt { place: &'static str, err: io::Error } {
+ cause(err)
+ display(me) -> ("io error at {}: {}", place, err)
+ from(s: String) -> {
+ place: "some string",
+ err: io::Error::new(io::ErrorKind::Other, s)
+ }
+ }
+ Discard {
+ from(&'static str)
+ }
+ }
+ }
+
+=======
+License
+=======
+
+Licensed under either of
+
+ * Apache License, Version 2.0, (./LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
+ * MIT license (./LICENSE-MIT or http://opensource.org/licenses/MIT)
+
+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.
+