pub struct BSD(/* private fields */);
Expand description
Classic 32-bit 4.4BSD rand() number generator.
It got replaced in FreeBSD 5, still included in NetBSD and OpenBSD.
Implementations§
Source§impl BSD
impl BSD
Sourcepub fn new() -> Self
pub fn new() -> Self
Constructs new BSD random generator.
Generator is implicitly initialized as if srand(1) had been invoked explicitly.
Sourcepub fn srand(seed: u32) -> Self
pub fn srand(seed: u32) -> Self
Seeds the algorithm with the seed parameter.
Repeatable sequence of rand() output may be obtained by calling srand() with the same seed.
Auto Trait Implementations§
impl Freeze for BSD
impl RefUnwindSafe for BSD
impl Send for BSD
impl Sync for BSD
impl Unpin for BSD
impl UnwindSafe for BSD
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