Show the crate…

3 releases

0.1.2 May 24, 2019
0.1.1 May 23, 2019
0.1.0 May 23, 2019

#86 in #condition

24 downloads per month

MIT license

4KB

types

Crates.io Crates.io LICENSE

Rust types conditions, wrap std::any::Typed.

Examples

ty_cond

assert_eq!(types::ty_cond(&0, &1), true);
assert_ne!(types::ty_cond(&0, &String::default()), true);

Conds

use types::Conds;

// ints
assert_eq!(0_i8.is_i8(), true);
assert_ne!(0_u8.is_i8(), true);

// uints
assert_eq!(0_u8.is_u8(), true);
assert_ne!(0_i8.is_u8(), true);

// floats
assert_eq!(0_f32.is_f32(), true);
assert_ne!(0_i32.is_f32(), true);

LICENSE

MIT

No runtime deps