id/README.md

33 lines
635 B
Markdown
Raw Permalink Normal View History

2024-02-07 03:39:47 +00:00
ID
==
## Simple macro to generate ::new() and ::get() methods for id types
2024-02-07 12:18:43 +00:00
## Example
```rust
use id::Id;
#[derive(Id)]
struct ObjectId(u32);
fn main(){
let obj=ObjectId::new(0);
let inner=obj.get();//u32
}
```
2024-02-07 03:39:47 +00:00
#### License
<sup>
Licensed under either of <a href="LICENSE-APACHE">Apache License, Version
2.0</a> or <a href="LICENSE-MIT">MIT license</a> at your option.
</sup>
<br>
<sub>
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in this crate by you, as defined in the Apache-2.0 license, shall
be dual licensed as above, without any additional terms or conditions.
</sub>