Function advanced_random_string::generate::generate_with_rng  
source · pub fn generate_with_rng<R: Rng>(
    length: usize,
    charset: &[u8],
    rng: &mut R
) -> StringExpand description
Generates a random string of a specified length using a given character set and RNG.
§Arguments
length- The length of the generated string.charset- A slice of bytes representing the character set to use for generating the string.rng- A mutable reference to an RNG implementing theRngtrait.
§Returns
A String containing randomly selected characters from the provided character set.
§Examples
use rand::SeedableRng;
use rand::rngs::SmallRng;
use advanced_random_string::{charset, generate_with_rng};
let mut rng = SmallRng::from_entropy();
let random_string = generate_with_rng(10, charset::BASE62, &mut rng);
println!("Generated string: {}", random_string);