pub struct RandomnessSource<M: ManagedTypeApi> { /* private fields */ }
Implementations§
Source§impl<M: ManagedTypeApi> RandomnessSource<M>
impl<M: ManagedTypeApi> RandomnessSource<M>
pub fn new() -> Self
pub fn next_u8(&mut self) -> u8
Sourcepub fn next_u8_in_range(&mut self, min: u8, max: u8) -> u8
pub fn next_u8_in_range(&mut self, min: u8, max: u8) -> u8
Range is [min, max)
pub fn next_u16(&mut self) -> u16
Sourcepub fn next_u16_in_range(&mut self, min: u16, max: u16) -> u16
pub fn next_u16_in_range(&mut self, min: u16, max: u16) -> u16
Range is [min, max)
pub fn next_u32(&mut self) -> u32
Sourcepub fn next_u32_in_range(&mut self, min: u32, max: u32) -> u32
pub fn next_u32_in_range(&mut self, min: u32, max: u32) -> u32
Range is [min, max)
pub fn next_usize(&mut self) -> usize
Sourcepub fn next_usize_in_range(&mut self, min: usize, max: usize) -> usize
pub fn next_usize_in_range(&mut self, min: usize, max: usize) -> usize
Range is [min, max)
pub fn next_u64(&mut self) -> u64
Sourcepub fn next_u64_in_range(&mut self, min: u64, max: u64) -> u64
pub fn next_u64_in_range(&mut self, min: u64, max: u64) -> u64
Range is [min, max)
pub fn next_bytes(&mut self, len: usize) -> ManagedBuffer<M>
Trait Implementations§
Source§impl<M: ManagedTypeApi> Default for RandomnessSource<M>
impl<M: ManagedTypeApi> Default for RandomnessSource<M>
Auto Trait Implementations§
impl<M> Freeze for RandomnessSource<M>
impl<M> RefUnwindSafe for RandomnessSource<M>
impl<M> Send for RandomnessSource<M>
impl<M> Sync for RandomnessSource<M>
impl<M> Unpin for RandomnessSource<M>
impl<M> UnwindSafe for RandomnessSource<M>
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