[][src]Module pui::runtime

A runtime checked identifier

It uses an id allocator (usually a simple id_alloc) to generate new ids, then uses those ids to verifiy it's identity. You can either use the Global allocator, which uses the largest unsigned non-zero integer possible (up to 64-bits), or you can create your own id allocator using the make_global_id_alloc

type BackingScalar = [u8; 3];
pui::make_global_id_alloc! {
    pub type MyCustomIdAllocator(CustomId) = BackingScalar;
}

Structs

Global

A gobal allocator for Runtime ids (not to be confused with a memory allocator)

GlobalId

The Id used by Global's [IdAlloc](crate::runtime::IdAlloc) implementation

Runtime

A runtime checked identifier

RuntimeHandle

A handle to a Runtime identifier

RuntimeId

an opaque Runtime id

Traits

IdAlloc

A id_alloc that allocates new ids

Pool

A pool of ids that can be used to reuse ids.

PoolMut

A pool of ids that can be used to reuse ids.