Skip to main content

Module id_generator

Module id_generator 

Source
Expand description

Ids handed out under a lock, to tell one thing apart from another that replaced it.

Two shapes use this, and the difference lives in the caller, not in the id:

An Id can only come from an IdGenerator, which never hands the same one out twice, so a holder of an id cannot forge one that collides with a later value.

Structs§

Id
An id handed out by an IdGenerator.
IdGenerator
Hands out an Id that is never equal to any it handed out before.