assert-type-eq 0.1.0

Macro to assert types across potentially different crate versions are compatible
Documentation
  • Coverage
  • 50%
    1 out of 2 items documented1 out of 1 items with examples
  • Size
  • Source code size: 15.4 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.01 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Homepage
  • Metaswitch/assert-type-eq-rs
    1 2 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • mirw bjgill Xenopathic

assert-type-eq

Build Status crates.io

This Rust crate adds a macro to assert at compile time that certain types are the same. This is useful when using the same crate via different dependencies, which may bring in different versions of the same crate, which Rust considers to have incompatible types. In most circumstances this will by itself lead to a compile-time error, however when using runtime structures such as Any or TypeMap, this will not cause compile-time issues, but rather runtime problems with missing or unexpected data. By using this crate, the different versions of the same crate can be asserted to be compatible, turning a runtime error into a compile-time error.