numid 0.2.9

A macro for generating structures which behave like numerical id.
Documentation
1
2
3
4
5
6
7
8
9
10
mod module {
    use numid::numid;
    numid!(pub struct TestPublic);
    numid!(struct TestPrivate);
}

fn main() {
    let _npu = module::TestPublic::new();
    let _npr = module::TestPrivate::new(); //~ ERROR struct `TestPrivate` is private
}