Crate pi_key_alloter

Crate pi_key_alloter 

Source

Macros§

new_key_type
A helper macro to create new key types. If you use a new key type for each slot map you create you can entirely prevent using the wrong key on the wrong slot map.

Structs§

DefaultKey
The default key type.
Drain
KeyAlloter
KeyAlloter 结构体用于线程安全地分配和回收Key。 结构体包含两个字段,max表示已分配Key的最大值,recycled用于存储曾经分配出去,后又被回收的Key 分配Key时, 如果recycled长度大于0,将从recycled中弹出一个Key,否则,分配的Key值为max,并且max会自增1
KeyData
The actual data stored in a Key.

Traits§

Key
it is suggested to have a unique key type for each slot map. You can create new key types using new_key_type!, which makes a new type identical to DefaultKey, just with a different name.

Functions§

is_older_version
Returns if a is an older version than b, taking into account wrapping of versions.
key_data

Type Aliases§

Queue