pub struct BoundedRandU16 { /* private fields */ }
Expand description
Allows sampling a u16
number in 0 .. N
.
The primary advantage of this type over BoundedRandU32 is that this type samples using only 32-bit multiplications rather than 64-bit multiplications, so on a 32-bit CPU this will perform much faster.
Implementations§
Source§impl BoundedRandU16
impl BoundedRandU16
pub const _4: Self
pub const _6: Self
pub const _8: Self
pub const _10: Self
pub const _12: Self
pub const _20: Self
Trait Implementations§
Source§impl Clone for BoundedRandU16
impl Clone for BoundedRandU16
Source§fn clone(&self) -> BoundedRandU16
fn clone(&self) -> BoundedRandU16
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 Debug for BoundedRandU16
impl Debug for BoundedRandU16
Source§impl Hash for BoundedRandU16
impl Hash for BoundedRandU16
Source§impl PartialEq for BoundedRandU16
impl PartialEq for BoundedRandU16
impl Copy for BoundedRandU16
impl Eq for BoundedRandU16
impl StructuralPartialEq for BoundedRandU16
Auto Trait Implementations§
impl Freeze for BoundedRandU16
impl RefUnwindSafe for BoundedRandU16
impl Send for BoundedRandU16
impl Sync for BoundedRandU16
impl Unpin for BoundedRandU16
impl UnwindSafe for BoundedRandU16
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