1 2 3 4 5 6 7 8 9 10 11 12
use rand::distributions::Alphanumeric; use rand::{self, Rng}; pub mod client; pub mod server; pub fn random_alphanumeric(len: usize) -> String { rand::thread_rng() .sample_iter(&Alphanumeric) .take(len) .collect() }