0.1.0-pre.3 Apr 29, 2023

#27 in #declare

22 downloads per month

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–2.1MB
~39K SLoC