3 unstable releases

0.2.1 Jan 7, 2020
0.2.0 Jan 1, 2020
0.1.0 Jun 22, 2019

#30 in #equality

Download history 15/week @ 2024-09-01 23/week @ 2024-09-08 16/week @ 2024-09-15 52/week @ 2024-09-22 27/week @ 2024-09-29 5/week @ 2024-10-06 20/week @ 2024-10-13 2/week @ 2024-10-20 4/week @ 2024-10-27 26/week @ 2024-11-03 7/week @ 2024-11-10 6/week @ 2024-11-17 7/week @ 2024-11-24 1/week @ 2024-12-01 82/week @ 2024-12-08 65/week @ 2024-12-15

156 downloads per month
Used in haskell_bits

MIT/Apache

3KB

Equality constraints for types

is_type gives the trait Is<X> which acts like an equality constraint.

There's also functions to move between these two equivalent types, as Rust will still not realise these types are

The constraint X : Is<Y> requires that X == Y.

The idea was stolen from this comment on equality constraints in where clauses which contains an example use case.

Note that into_val and from_val are basically into and from, but for this trait to work universally we need a universal instance, which one can't define on Into or From.

No runtime deps