servlin 0.8.0

Modular HTTP server library, threaded handlers and async performance
Documentation
1
2
3
4
5
6
7
8
9
10
11
use rand::rngs::SmallRng;
use rand::{RngCore, SeedableRng};
use std::cell::RefCell;

thread_local! {
    pub static THREAD_LOCAL_SMALL_RNG: RefCell<SmallRng> = RefCell::new(SmallRng::from_entropy());
}

pub fn next_insecure_rand_u64() -> u64 {
    THREAD_LOCAL_SMALL_RNG.with(|cell| cell.borrow_mut().next_u64())
}