3 releases (1 stable)
| 1.0.0 | Jul 4, 2025 |
|---|---|
| 0.3.1 | Jan 12, 2024 |
| 0.2.1 |
|
| 0.1.3 |
|
#1207 in Rust patterns
Used in toast-cell
10KB
75 lines
type-factory
Generates unique values of opaque types.
lib.rs:
Generates unique values of opaque types.
Purpose
impl [Unique] types are guaranteed to be unique. They cannot be
copied or cloned and are suitable for use as brand types.
The toast-cell crate utilizes this
property.
Similar crates
generativity provides a macro to
generate unique invariant lifetimes. It does not require dependent code to
reside within a closure.
Minimum supported Rust version
The MSRV is currently 1.56.
This may change between minor releases.
License
This crate is licensed under the Blue Oak Model License 1.0.0.