Trait-based type-level equality constraint for Rust
This crate provides a trait-based implementation of equality constraints. It is intended as a stopgap until proper equality predicates are implemented as described in the where
-clause RFC.
Because it is a hack, there are some limitations with how it can be used. It is most effective as a helper for encoding additional trait invariants in order to rule out invalid implementations. Previously it was useful as a means to specify Self
for static method invocation but this is no longer needed with UFCS.
See the API documentation here.
You can install both with the following:
$ curl -s https://static.rust-lang.org/rustup.sh | sudo sh
See Installing Rust for further details.
$ cargo build ## build library and binary
$ cargo test ## run tests in ./tests
$ cargo bench ## run benchmarks in ./benches
There is an IRC channel on freenode (chat.freenode.net) at #epsilonz.