[][src]Module pui::typeid

A type based identifier that uses a unique type parameter to assert uniqueness

A given type parameter may only be associated with a single instance of Type<T>, and this can be achieved in two ways. One is through a runtime check that tracks the lifetime of the type, and the other is by creating a unique type every you create an instance of Type<T>.

The make_typeid macro uses the former approach. It defines a new type that tracks it's lifetime and only allows a new Type<T> on non-overlapping lifetimes.

The make_anon_typeid macro uses the later approach. It creates a new unique instance of Type every time it is called.

Structs

Type

A type based identifier

TypeHandle

A handle to to a Type identifier