[src]

std::local_data::Key

type Key<T> = &'static KeyValue<T>;

Indexes a task-local data slot. This pointer is used for comparison to differentiate keys from one another. The actual type T is not used anywhere as a member of this type, except that it is parameterized with it to define the type of each key's value.

The value of each Key is of the singleton enum KeyValue. These also have the same name as Key and their purpose is to take up space in the programs data sections to ensure that each value of the Key type points to a unique location.