Struct product_os_random::RandomGenerator
source · pub struct RandomGenerator { /* private fields */ }
Implementations§
source§impl RandomGenerator
impl RandomGenerator
pub fn new(gen: Option<RNG>) -> Self
pub fn generate_simple_key_one_time(len: usize) -> Vec<u8>
pub fn generate_key_one_time( len: usize, gen: &mut Option<impl RngCore>, ) -> Vec<u8>
pub fn get_simple_random_bytes_one_time( len: usize, gen: &mut Option<impl RngCore>, ) -> Vec<u8>
pub fn get_random_bytes_one_time( len: usize, gen: &mut Option<impl RngCore>, ) -> Vec<u8>
pub fn get_simple_random_usize_one_time(min: usize, max: usize) -> usize
pub fn get_random_usize_one_time( min: usize, max: usize, gen: &mut Option<impl RngCore>, ) -> usize
pub fn get_simple_random_string_one_time( len: usize, gen: &mut Option<impl RngCore>, ) -> String
pub fn get_random_string_one_time( len: usize, gen: &mut Option<impl RngCore>, ) -> String
pub fn get_simple_random_from_characters_one_time( len: usize, characters: &str, ) -> String
pub fn get_random_from_characters_one_time( len: usize, characters: &str, gen: &mut Option<impl RngCore>, ) -> String
pub fn get_simple_random_alphanumeric_one_time(len: usize) -> String
pub fn get_random_alphanumeric_one_time( len: usize, gen: &mut Option<impl RngCore>, ) -> String
pub fn get_simple_random_password_one_time(len: usize) -> String
pub fn get_random_password_one_time( len: usize, gen: &mut Option<impl RngCore>, ) -> String
Trait Implementations§
source§impl Clone for RandomGenerator
impl Clone for RandomGenerator
source§fn clone(&self) -> RandomGenerator
fn clone(&self) -> RandomGenerator
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl RandomGeneratorTemplate for RandomGenerator
impl RandomGeneratorTemplate for RandomGenerator
fn get_random_bytes(&mut self, len: usize) -> Vec<u8>
fn get_random_usize(&mut self, min: usize, max: usize) -> usize
fn get_random_u32(&mut self) -> u32
fn get_random_u64(&mut self) -> u64
fn get_random_string(&mut self, len: usize) -> String
fn get_random_from_characters(&mut self, len: usize, characters: &str) -> String
fn get_random_alphanumeric(&mut self, len: usize) -> String
fn generate_key(&mut self, len: usize) -> Vec<u8>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)