3 releases (breaking)
| 0.4.0 | Mar 14, 2024 |
|---|---|
| 0.3.0 | Mar 6, 2024 |
| 0.2.0 |
|
| 0.1.0 | Mar 2, 2024 |
#3 in #t1
178 downloads per month
16KB
176 lines
Uniqueness of types via invariant lifetimes.
Provides a UniqueType marker which makes it impossible to call the following without resorting to unsafe code:
fn same_type<'c, T>(t1: UniqueType<'c, T>, t2: UniqueType<'c, T>)
{
panic!("this is impossible!")
}
genz
Uniqueness of types via invariant lifetimes.
Provides a non-Copy zero-sized type-marker called UniqueType, which makes it impossible to call the following
without resorting to unsafe code:
# use genz::*;
fn same_type<'c, T>(t1: UniqueType<'c, T>, t2: UniqueType<'c, T>)
{
panic!("this is impossible!")
}