[−][src]Module pui_core::dynamic
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 |
DynamicToken | A token that is recognized by |
Global | A global scalar allocator that's backed by a |
ThreadLocal | A thread-local scalar allocator that's backed by a |