Expand description
A dynamically created type that is guarnteed to be unique on the given thread or process
Dynamic uses ScalarAllocator and PoolMut
to ensure that it holds a unique value. This value
is cloned into the DynamicToken and used to
verify identity.
Dynamic initially tries to pull a value from PoolMut
if that fails, it then allocates a new value from the
ScalarAllocator. Unless the backing Scalar is (),
then this checks it’s identity at runtime. Hence the name,
Dynamic.
If the provided pool is (), then no values will be reused,
and this allows Dynamic to implement OneShotIdentifier.
Structs§
- Dynamic
- A dynamically created type that is guarnteed to be unique on the given thread
and if
A::AutoTraits: Send + Syncon the given process. - Dynamic
Token - A token that is recognized by
Dynamic - Global
- A global scalar allocator that’s backed by a
NonZeroU64. This allowsOption<DynamicToken<Global>>to be the same size asDynamicToken<Global> - Thread
Local - A thread-local scalar allocator that’s backed by a
NonZeroU64This allowsOption<DynamicToken<ThreadLocal>>to be the same size asDynamicToken<ThreadLocal>