Skip to content

dmkolobov/genz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!")
}

About

Uniqueness of types via invariant lifetimes.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages