3 unstable releases

0.2.1 Jan 7, 2020
0.2.0 Jan 1, 2020
0.1.0 Jun 22, 2019
Download history 62/week @ 2023-02-01 108/week @ 2023-02-08 118/week @ 2023-02-15 24/week @ 2023-02-22 153/week @ 2023-03-01 29/week @ 2023-03-08 47/week @ 2023-03-15 59/week @ 2023-03-22 127/week @ 2023-03-29 38/week @ 2023-04-05 34/week @ 2023-04-12 21/week @ 2023-04-19 54/week @ 2023-04-26 52/week @ 2023-05-03 22/week @ 2023-05-10 52/week @ 2023-05-17

183 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