assert_bound

Crates.ioassert_bound
lib.rsassert_bound
version0.1.1
sourcesrc
created_at2019-11-29 22:05:38.65771
updated_at2019-11-29 22:16:00.696627
descriptionSimple create that helps in asserting type bounds
homepagehttps://github.com/WaffleLapkin/assert_bound/
repositoryhttps://github.com/WaffleLapkin/assert_bound/
max_upload_size
id185438
size8,729
Waffle Maybe (WaffleLapkin)

documentation

https://docs.rs/assert_bound/

README

assert_bound

Simple rust lib for type assertions.

Examples

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);
Commit count: 20

cargo fmt