Skip to main content

uniqid

Function uniqid 

Source
pub fn uniqid(prefix: &str, more_entropy: bool) -> String
Expand description

PHP uniqid($prefix, $more_entropy): seconds and microseconds in hex (%08x%05x), plus %.8F of a random value in [0, 10) with more entropy.

Without more entropy, like PHP, two calls never return the same value in one process: a call in the same microsecond as the previous one waits for the clock to move on.