trait-bounds
This nightly-only library provides useful primitives for defining trait bounds
eq and ne functions allow to check whether two types are equal in a const context
type_id is similar to core::intrinsics::type_id, but it can be used on PointeeSized types
Assert<true> implements IsTrue
Assert<false> implements IsFalse
Is<T> is implemented for U if and only if U is equal to T
Not<T> is implemented for U if and only if U is not equal to T
The Not trait can be used to define multiple blanket implementations, which is particularly useful with the From<T> trait,
as From<T> for T often collides with user-defined blanket impls
use Not;
use ;
use Not;
// note that it does implement Error, unlike anyhow/eyre error types
// and excluding Self from the trait bound allows to implement a blanket From<E: Error>, even though a blanket impl From<T> for T is defined in the core