Rust 的 typed ID
所有者 cjwcommuny.
#18 在 #customer
3KB
use typed_id::Id; struct Customer { name: String, } type CustomerId = Id<i32, Customer>; let customer_id = CustomerId::new(1);