unique-type-id
A rust procedural macro crate for generating unique id for the rust types.
What does it do?
It simply implements a trait for the type where is only one method - id() -> TypeId which returns a unique positive number. Unique in the whole project, but not everywhere else.
Usage
- Add
unique-type-idas dependency in yourCargo.toml:
[]
= "0.1"
= "0.1"
- Create a struct or enum and use the trait:
extern crate unique_type_id_derive;
extern crate unique_type_id;
License
This project is licensed under the MIT license.