pub struct PythonRandom { /* private fields */ }
Implementations§
Source§impl PythonRandom
impl PythonRandom
pub fn new(mt: MersenneTwister) -> PythonRandom
pub fn random(&mut self) -> f64
pub fn getrandbits(&mut self, k: u32) -> u64
pub fn randbelow(&mut self, n: u64) -> u64
pub fn seed_u32(&mut self, s: u32)
pub fn expovariate(&mut self, lambda: f64) -> f64
pub fn shuffle<T>(&mut self, x: &mut [T])
pub fn randint(&mut self, start: u64, stop: u64) -> u64
pub fn randrange(&mut self, start: u64, stop: u64) -> u64
Auto Trait Implementations§
impl Freeze for PythonRandom
impl RefUnwindSafe for PythonRandom
impl Send for PythonRandom
impl Sync for PythonRandom
impl Unpin for PythonRandom
impl UnwindSafe for PythonRandom
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