pub struct RandomGenerator { /* private fields */ }Expand description
Generates tokens from random bytes.
Each byte is chosen randomly from the basic rand::thread_rng. This generator will always
succeed.
Implementations§
Source§impl RandomGenerator
impl RandomGenerator
Sourcepub fn new(length: usize) -> RandomGenerator
pub fn new(length: usize) -> RandomGenerator
Generates tokens with a specific byte length.
Trait Implementations§
Source§impl<'a> TagGrant for &'a RandomGenerator
impl<'a> TagGrant for &'a RandomGenerator
Auto Trait Implementations§
impl Freeze for RandomGenerator
impl RefUnwindSafe for RandomGenerator
impl Send for RandomGenerator
impl Sync for RandomGenerator
impl Unpin for RandomGenerator
impl UnwindSafe for RandomGenerator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more