Crates.io | assert_bound |
lib.rs | assert_bound |
version | 0.1.1 |
source | src |
created_at | 2019-11-29 22:05:38.65771 |
updated_at | 2019-11-29 22:16:00.696627 |
description | Simple create that helps in asserting type bounds |
homepage | https://github.com/WaffleLapkin/assert_bound/ |
repository | https://github.com/WaffleLapkin/assert_bound/ |
max_upload_size | |
id | 185438 |
size | 8,729 |
Simple rust lib for type assertions.
use assert_bound::assert_bound;
// assert that `()` implements Debug + Ord + PartialEq<()>
assert_bound!(() => std::fmt::Debug + Ord + PartialEq<()>);
// f32/f64 doesn't implement `Eq`, so rustc will
// fail to compile next line if it you uncomment it
// assert_bound!(0.1 => Eq);