pub trait RdSeed {
unsafe fn fill_random(&mut self) -> bool;
}
Expand description
RdSeed trait to implement the generic rdseed_slice function.
Required Methods
unsafe fn fill_random(&mut self) -> bool
unsafe fn fill_random(&mut self) -> bool
Fills self
with random bits. Returns true on success or false otherwise
Safety
RDSEED is not supported on all architctures, so using this may crash you.
Implementations on Foreign Types
sourceimpl RdSeed for u8
impl RdSeed for u8
sourceunsafe fn fill_random(&mut self) -> bool
unsafe fn fill_random(&mut self) -> bool
Fills the 16-bit value with a random bit string
Safety
Will crash if RDSEED instructions are not supported.
sourceimpl RdSeed for u16
impl RdSeed for u16
sourceunsafe fn fill_random(&mut self) -> bool
unsafe fn fill_random(&mut self) -> bool
Fills the 16-bit value with a random bit string
Safety
Will crash if RDSEED instructions are not supported.
sourceimpl RdSeed for u32
impl RdSeed for u32
sourceunsafe fn fill_random(&mut self) -> bool
unsafe fn fill_random(&mut self) -> bool
Fills the 32-bit value with a random bit string
Safety
Will crash if RDSEED instructions are not supported.
sourceimpl RdSeed for u64
impl RdSeed for u64
sourceunsafe fn fill_random(&mut self) -> bool
unsafe fn fill_random(&mut self) -> bool
Fills the 64-bit value with a random bit string
Safety
Will crash if RDSEED instructions are not supported.