| Crates.io | genz |
| lib.rs | genz |
| version | 0.4.0 |
| created_at | 2024-03-02 21:48:41.629714+00 |
| updated_at | 2024-03-14 03:30:05.990308+00 |
| description | Uniqueness of types via invariant lifetimes. |
| homepage | |
| repository | https://github.com/dmkolobov/genz |
| max_upload_size | |
| id | 1160072 |
| size | 16,365 |
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!")
}