[−][src]Trait pui::runtime::IdAlloc
A id_alloc that allocates new ids
Safety
two equal ids may never exist together on the same thread
This implies that IdAlloc::*next()
may never repeat an id on the same thread,
and if it can repeat itself on different threads then Self: !Send + !Sync
and Self::Id:: !Send + !Sync
.
Associated Types
Loading content...Required methods
pub fn alloc(&mut self) -> Self::Id
[src]
Get the next id, panics if there are no next ids
pub fn try_alloc(&mut self) -> Option<Self::Id>
[src]
Try to get the next id, returns None
if there are no next ids