Expand description
Provides the ability to imprint values at the type level, enabling compile-time validation of values that only exist at run time.
Heavily inspired by Edward Kmett’s reflection and
eq libraries, as well as Gankro’s sound unchecked
indexing approach.
Modules§
Structs§
- Exists
- An object with an existentially quantified lifetime.
- IdF
- Identity function for types.
- TyEq
- Propositional equality between types.
- Val
- A value imprinted at the type level.
- ValF
- Allows
Valto be parameterized by its lifetime parameter.
Traits§
- Into
Inner - Allows the inner value to be extracted from a wrapped value.
- TyFn
- Used to define type-level functions.
- TyFnL
- Used to define type-level functions with existential parameters, intended
for use with
Exists.
Functions§
- imprint
- Imprint the type of an object with its own value.
Type Aliases§
- Phantom
Invariant Data - Like
PhantomDatabut ensures thatTis always invariant. - Phantom
Invariant Lifetime - Like
PhantomDatabut ensures that'ais always invariant.