diff --git a/README.md b/README.md index 721a7c6..6fb766a 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,20 @@ ID ## Simple macro to generate ::new() and ::get() methods for id types +## Example + +```rust +use id::Id; + +#[derive(Id)] +struct ObjectId(u32); + +fn main(){ + let obj=ObjectId::new(0); + let inner=obj.get();//u32 +} +``` + #### License