Crate imprint [] [src]

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

arith
ix

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 Val to be parameterized by its lifetime parameter.

Traits

IntoInner

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 Definitions

PhantomInvariantData

Like PhantomData but ensures that T is always invariant.

PhantomInvariantLifetime

Like PhantomData but ensures that 'a is always invariant.