gecko-dev/third_party/rust/void
Manish Goregaokar cd6c97ea60 Bug 1336607 - Update vendored Rust sources to include geckolib dependencies; r=froydnj
MozReview-Commit-ID: BOgu41N351y

--HG--
rename : third_party/rust/serde/.cargo-checksum.json => third_party/rust/serde-0.8.23/.cargo-checksum.json
rename : third_party/rust/serde/Cargo.toml => third_party/rust/serde-0.8.23/Cargo.toml
rename : third_party/rust/serde/src/bytes.rs => third_party/rust/serde-0.8.23/src/bytes.rs
rename : third_party/rust/serde/src/de/impls.rs => third_party/rust/serde-0.8.23/src/de/impls.rs
rename : third_party/rust/serde/src/de/mod.rs => third_party/rust/serde-0.8.23/src/de/mod.rs
rename : third_party/rust/serde/src/de/value.rs => third_party/rust/serde-0.8.23/src/de/value.rs
rename : third_party/rust/serde/src/error.rs => third_party/rust/serde-0.8.23/src/error.rs
rename : third_party/rust/serde/src/lib.rs => third_party/rust/serde-0.8.23/src/lib.rs
rename : third_party/rust/serde/src/macros.rs => third_party/rust/serde-0.8.23/src/macros.rs
rename : third_party/rust/serde/src/ser/impls.rs => third_party/rust/serde-0.8.23/src/ser/impls.rs
rename : third_party/rust/serde/src/ser/mod.rs => third_party/rust/serde-0.8.23/src/ser/mod.rs
extra : rebase_source : d015147c7a6c01b34c5a1abf035d71f8ecfe0c12
2017-02-10 12:19:18 -08:00
..
src
.cargo-checksum.json
.cargo-ok
.gitignore
.travis.yml
Cargo.toml
README.md

README.md

Void

The uninhabited void type for use in statically impossible cases.

Documentation

The uninhabited type, enum Void { } is useful in dealing with cases you know to be impossible. For instance, if you are implementing a trait which allows for error checking, but your case always succeeds, you can mark the error case or type as Void, signaling to the compiler it can never happen.

This crate also comes packed with a few traits offering extension methods to Result<T, Void> and Result<Void, T>.

Usage

Use the crates.io repository; add this to your Cargo.toml along with the rest of your dependencies:

[dependencies]
void = "1"

Then, use Void in your crate:

extern crate void;
use void::Void;

Author

Jonathan Reem is the primary author and maintainer of void.

License

MIT