Crates.io | assert-type-eq |
lib.rs | assert-type-eq |
version | 0.1.0 |
source | src |
created_at | 2017-08-31 08:23:01.463532 |
updated_at | 2017-08-31 08:23:01.463532 |
description | Macro to assert types across potentially different crate versions are compatible |
homepage | https://github.com/Metaswitch/assert-type-eq-rs |
repository | https://github.com/Metaswitch/assert-type-eq-rs |
max_upload_size | |
id | 30012 |
size | 15,772 |
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.