3 unstable releases

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

#27 in #equality

Download history 88/week @ 2024-04-01 42/week @ 2024-04-08 49/week @ 2024-04-15 51/week @ 2024-04-22 59/week @ 2024-04-29 54/week @ 2024-05-06 61/week @ 2024-05-13 99/week @ 2024-05-20 65/week @ 2024-05-27 82/week @ 2024-06-03 37/week @ 2024-06-10 46/week @ 2024-06-17 72/week @ 2024-06-24 39/week @ 2024-07-01 45/week @ 2024-07-08 47/week @ 2024-07-15

209 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