u8

Function u8 

Source
pub fn u8() -> u8
Expand description

Will generate a random u8

ยงExample

let a: u8 = hel_random::u8();
let b: u8 = hel_random::u8();
// Examples generated by macro, so we check if type is `bool` or `i8` or `u8` to avoid collisions
if std::mem::size_of::<u8>() > 1 {
    assert!(a != b);
}