pub struct IdGen { /* private fields */ }Expand description
Thread-safe generator for all ID types. Each counter is process-local and starts at 1 (0 is reserved as a sentinel “null” value).
Implementations§
Source§impl IdGen
impl IdGen
Sourcepub fn next_atom_id(&self) -> AtomId
pub fn next_atom_id(&self) -> AtomId
Generate the next unique AtomId.
Sourcepub fn next_block_id(&self) -> BlockId
pub fn next_block_id(&self) -> BlockId
Generate the next unique BlockId.
Sourcepub fn next_edge_id(&self) -> EdgeId
pub fn next_edge_id(&self) -> EdgeId
Generate the next unique EdgeId.
Sourcepub fn next_graph_id(&self) -> GraphId
pub fn next_graph_id(&self) -> GraphId
Generate the next unique GraphId.
Sourcepub fn next_port_id(&self) -> PortId
pub fn next_port_id(&self) -> PortId
Generate the next unique PortId.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for IdGen
impl RefUnwindSafe for IdGen
impl Send for IdGen
impl Sync for IdGen
impl Unpin for IdGen
impl UnsafeUnpin for IdGen
impl UnwindSafe for IdGen
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more