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
X : Is<Y> requires that
The idea was stolen from this comment on equality constraints in where clauses which contains an example use case.
Note that whilst I'd like the trait
Is to have the where condition:
where Self : From<Self::Type>
the Rust compiler doesn't like the self referential nature of this.