id (0.1.0)
Published 2024-03-29 07:42:36 +00:00 by Quaternions
Installation
[registry]
default = "gitea"
[registries.gitea]
index = "sparse+ " # Sparse index
# index = " " # Git
[net]
git-fetch-with-cli = true
cargo add id@0.1.0
About this package
ID
Simple macro to generate ::new() and ::get() methods for id types
Example
use id::Id;
#[derive(Id)]
struct ObjectId(u32);
fn main(){
let obj=ObjectId::new(0);
let inner=obj.get();//u32
}
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.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.
Dependencies
ID | Version |
---|---|
proc-macro2 | ^1.0.78 |
quote | ^1.0.35 |
syn | ^2.0.48 |
Details
2024-03-29 07:42:36 +00:00
Assets (1)
Versions (1)
View all
Cargo
39
5.5 KiB
id-0.1.0.crate
5.5 KiB
0.1.0
2024-03-29