5 stable releases

1.1.2 Feb 13, 2025
1.1.1 Oct 17, 2021
1.1.0 Jul 15, 2020
1.0.1 Nov 23, 2019

#4 in #ed

Download history 161/week @ 2025-08-18 505/week @ 2025-08-25 680/week @ 2025-09-01 323/week @ 2025-09-08 329/week @ 2025-09-15 291/week @ 2025-09-22 572/week @ 2025-09-29 251/week @ 2025-10-06 354/week @ 2025-10-13 385/week @ 2025-10-20 347/week @ 2025-10-27 351/week @ 2025-11-03 353/week @ 2025-11-10 437/week @ 2025-11-17 352/week @ 2025-11-24 332/week @ 2025-12-01

1,489 downloads per month
Used in 103 crates (14 directly)

MIT license

6KB
129 lines

TypId

Typed Unique Identifier gives you ability to create and use identifiers bound to specified type.

Installation

Cargo.toml

[dependencies]
typid = "1"

Example

use typid::ID;

struct Foo {
    pub id: ID<Foo>,
}

fn main() {
    let a = Foo { id: ID::new() };
    let b = Foo { id: ID::new() };
    assert_ne!(a.id, b.id);
}

Dependencies

~0.3–1.1MB
~24K SLoC