Crates.io | types |
lib.rs | types |
version | 0.1.2 |
source | src |
created_at | 2019-05-23 17:20:40.612163 |
updated_at | 2019-05-24 12:10:02.817546 |
description | Type condtions. |
homepage | https://github.com/clearloop/types |
repository | https://github.com/clearloop/types |
max_upload_size | |
id | 136466 |
size | 6,548 |
Rust types conditions, wrap std::any::Typed
.
assert_eq!(types::ty_cond(&0, &1), true);
assert_ne!(types::ty_cond(&0, &String::default()), true);
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);