genz 0.4.0

Uniqueness of types via invariant lifetimes.
Documentation
  • Coverage
  • 100%
    17 out of 17 items documented8 out of 8 items with examples
  • Size
  • Source code size: 16.04 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 3.74 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 10s Average build duration of successful builds.
  • all releases: 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • dmkolobov/genz
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • dmkolobov

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