From 12788912c732a4830322727ecdad14255a9d0654 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Wed, 7 Feb 2024 04:18:43 -0800 Subject: [PATCH] example --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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