Struct limn_core::resources::id::IdGen
[−]
[src]
pub struct IdGen<I> { /* fields omitted */ }
Generates named Ids, wrappers around increasing usize values.
For Ids to be unique, just needs to be one IdGen
per Id type.
Methods
impl<I: Id> IdGen<I>
[src]
pub fn new() -> Self
[src]
pub fn next_id(&mut self) -> I
[src]
Not to be confused with std::iterator::Iterator::next()
!
This function simply increases the Id by 1 while keeping the type