Function cap_rand::random [−][src]
pub unsafe fn random<T>() -> T where
Standard: Distribution<T>,
Generates a random value using the thread-local random number generator.
This corresponds to rand::random
.
Safety
This function is unsafe because it makes use of ambient authority to access the platform entropy source, which doesn’t uphold the invariant of the rest of the API. It is otherwise safe to use.