[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 10/86] gnu: Add rust-void.
From: |
ng0 |
Subject: |
[PATCH 10/86] gnu: Add rust-void. |
Date: |
Tue, 3 Jan 2017 23:35:26 +0000 |
* gnu/packages/rust.scm (rust-void): New variable.
---
gnu/packages/rust.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 674570c7d..fe133c084 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -453,3 +453,29 @@ For many system APIs, Nix provides a safe alternative to
the unsafe API
exposed by the libc crate. This is done by wrapping the libc
functionality with types/abstractions that enforce legal/safe usage.")
(license license:expat)))
+
+(define-public rust-void
+ (package
+ (name "rust-void")
+ (version "1.0.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "void" version))
+ (file-name
+ (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0zc8f0ksxvmhvgx4fdg0zyn6vdnbxd2xv9hfx4nhzg6kbs4f80ka"))))
+ (build-system cargo-build-system)
+ (home-page "https://github.com/reem/rust-void.git")
+ (synopsis "Uninhabited void type for use in statically impossible cases")
+ (description
+ "The uninhabited type, @code{enum Void { }} is useful in dealing
+with cases you know to be impossible. 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 @code{Result<T, Void>} and @code{Result<Void, T>}.")
+ (license license:expat)))
--
2.11.0
- [PATCH 03/86] gnu: Add rust-lazy-static., (continued)
- [PATCH 03/86] gnu: Add rust-lazy-static., ng0, 2017/01/03
- [PATCH 01/86] gnu: Add rust-libc., ng0, 2017/01/03
- [PATCH 02/86] gnu: Add rust-spin., ng0, 2017/01/03
- [PATCH 04/86] gnu: Add dotherside., ng0, 2017/01/03
- [PATCH 05/86] gnu: Add rust-qml., ng0, 2017/01/03
- [PATCH 08/86] gnu: Add rust-rand., ng0, 2017/01/03
- [PATCH 12/86] gnu: Add rust-winapi-build., ng0, 2017/01/03
- [PATCH 10/86] gnu: Add rust-void.,
ng0 <=
- [PATCH 11/86] gnu: Add rust-slab., ng0, 2017/01/03
- [PATCH 13/86] gnu: Add rust-tempdir., ng0, 2017/01/03
- [PATCH 14/86] gnu: Add rust-glob., ng0, 2017/01/03
- [PATCH 07/86] gnu: Add rust-futures., ng0, 2017/01/03
- [PATCH 09/86] gnu: Add rust-nix-test., ng0, 2017/01/03
- [PATCH 06/86] gnu: Add rust-log., ng0, 2017/01/03
- [PATCH 15/86] gnu: Add rust-scoped-tls., ng0, 2017/01/03