typid

Crates.iotypid
lib.rstypid
version1.1.1
sourcesrc
created_at2019-11-23 20:25:57.538989
updated_at2021-10-17 22:46:25.980806
description(Typ)ed Unique (Id)entifiers
homepagehttps://github.com/PsichiX/typid
repositoryhttps://github.com/PsichiX/typid
max_upload_size
id183797
size6,483
Patryk BudzyƄski (PsichiX)

documentation

https://docs.rs/typid

README

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);
}
Commit count: 7

cargo fmt