Crate type_equalities[−][src]
Implements TypeEq
that can be passed around and used at runtime to safely coerce values,
references and other structures dependending on these types.
The equality type is zero-sized, and the coercion should optimize to a no-op in all cases.
Structs
ComposeF | Composition for |
IdF | The identity |
LoefIdF | A |
LoefIdFlippedF |
|
MutRefF | The |
RefF | The |
SliceF | The |
TypeEq | Evidence of the equality |
Traits
AliasSelf | Trait used to convince the rust type checker of the claimed equality |
Consumer | A consumer recives evidence of a type equality |
IsEqual | Equality at a constraint level, as a type alias. Reflexivity holds. |
TypeFunction | A trait for type level functions, mapping type arguments to type results. |
Functions
coerce | Coerce a value of type |
coerce_box | Coerce a value of type |
coerce_mut | Coerce a value of type |
coerce_ref | Coerce a value of type |
refl | Construct evidence of the reflexive equality |
substitute | Our internal workhorse for most of the other coerce implementations, lifting the equality through
an arbitrary |
trivial_eq | Construct evidence of |
Type Definitions
ApF | The result of applying the |