Crate type_equalities[−][src]
Implements type equalities 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 | Implements the identity |
LoefIdF | Implements a |
MutRefF | Implements the |
RefF | Implements 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 |
TypeFunction | A trait mapping type arguments to results. Note that |
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 |
lift_equality | Lift the type equality through any |
refl | Construct evidence of the reflexive equality |
substitute | Our internal workhorse for most of the other coerce implementations, lifting the equality through
an arbitrary |
Type Definitions
ApF | The result of applying the |