/// Make a numerical uid with size = length
Make a numerical uid with size = length
Make a numerical uid with size = length
pub fn new_numerical(length: u32) -> u32 {
        let mut id = 0;
        for i in 0..length {
            let mut rng = thread_rng();
            // Exclusive range
            let int: u32 = rng.gen_range(0..10);
            let base = u32::pow(10, i);
            id += base * int;
        }
        id
    }
pub fn new_numerical ( length : u32 ) -> u32 { let mut id = 0 ; for i in 0 .. length { let mut rng = thread_rng ( ) ; // Exclusive range let int : u32 = rng . gen_range ( 0 .. 10 ) ; let base = u32 :: pow ( 10 , i ) ; id += base * int ; } id }
Make a numerical uid with size = length
Make a numerical uid with size = length
length
u32