Struct urandom::distributions::Alphanumeric
source · pub struct Alphanumeric;
Expand description
Sample a char
, uniformly distributed over ASCII letters and numbers: a-z, A-Z and 0-9.
Examples
use urandom::distributions::Alphanumeric;
let mut rng = urandom::new();
let chars: String = rng.samples(Alphanumeric).take(7).collect();
println!("Random chars: {}", chars);
Trait Implementations
sourceimpl Clone for Alphanumeric
impl Clone for Alphanumeric
sourcefn clone(&self) -> Alphanumeric
fn clone(&self) -> Alphanumeric
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for Alphanumeric
impl Debug for Alphanumeric
sourceimpl Distribution<char> for Alphanumeric
impl Distribution<char> for Alphanumeric
impl Copy for Alphanumeric
Auto Trait Implementations
impl RefUnwindSafe for Alphanumeric
impl Send for Alphanumeric
impl Sync for Alphanumeric
impl Unpin for Alphanumeric
impl UnwindSafe for Alphanumeric
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more