Skip to main content

define_atomic_id

Macro define_atomic_id 

Source
macro_rules! define_atomic_id {
    ($atomic_id_type:ident) => { ... };
}
Expand description

Defines a 32-bit id type which guarantees global uniqueness via atomics on a static global.

Note that this means the id space is process-wide, as such it may potentially be exhausted by a combination of long-running processes and multiple bevy Worlds, at which point we panic.