Function cap_rand::thread_rng [−][src]
pub unsafe fn thread_rng() -> CapRng
Retrieve the lazily-initialized thread-local random number generator, seeded by the system.
This corresponds to rand::thread_rng
.
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.