genz

Crates.iogenz
lib.rsgenz
version0.4.0
sourcesrc
created_at2024-03-02 21:48:41.629714
updated_at2024-03-14 03:30:05.990308
descriptionUniqueness of types via invariant lifetimes.
homepage
repositoryhttps://github.com/dmkolobov/genz
max_upload_size
id1160072
size16,365
Dmitry Kolobov (dmkolobov)

documentation

README

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!")
}
Commit count: 0

cargo fmt