#type #macro #type-branding

typetoken

type tokens for branding via unique singletons

1 unstable release

0.0.1 Jun 8, 2024

#158 in #macros

MIT license

7KB

type tokens for branding via unique singletons

see the documentation of token! for details.

Special Thanks

quinedot, for their excelent analysis of my initial code, on which much of the documentation for this crate is based.


lib.rs:

a type token that can be used to uniquly tag an instance of a type.

these are singleton types, only a single instance of a given token type may exist. to make checking this at compile time possible, tokens cannot be returned from functions.

No runtime deps