Struct dashu_int::rand::UniformBits
source · pub struct UniformBits { /* private fields */ }
Expand description
Implementations§
source§impl UniformBits
impl UniformBits
sourcepub const fn new(bits: usize) -> Self
pub const fn new(bits: usize) -> Self
Create a UniformBits distribution with a given limit on the integer’s bit length.
Trait Implementations§
source§impl Distribution<IBig> for UniformBits
impl Distribution<IBig> for UniformBits
source§fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> IBig
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> IBig
Generate a random value of
T
, using rng
as the source of randomness.source§impl Distribution<UBig> for UniformBits
impl Distribution<UBig> for UniformBits
source§fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> UBig
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> UBig
Generate a random value of
T
, using rng
as the source of randomness.Auto Trait Implementations§
impl RefUnwindSafe for UniformBits
impl Send for UniformBits
impl Sync for UniformBits
impl Unpin for UniformBits
impl UnwindSafe for UniformBits
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