0.1.0-pre.3 Apr 29, 2023

#24 in #declare

MIT license

9KB
208 lines

Branded ID — bid

This library streamlines the process of defining and branded ID types through the bid::declare! macro.

Example:

bid::declare!(pub struct UserId(i32));

#[derive(Debug, Deserialize, Serialize)]
pub struct User {
    pub id: UserId,
    pub username: String,
    // ...
}

Dependencies

~0.1–1.8MB
~34K SLoC