Trait RdRand

Source
pub trait RdRand {
    // Required method
    unsafe fn fill_random(&mut self) -> bool;
}
Expand description

RdRand trait to implement the generic rdrand_slice function.

Required Methods§

Source

unsafe fn fill_random(&mut self) -> bool

Fills self with random bits. Returns true on success or false otherwise

§Safety

RDRAND is not supported on all architctures, so using this may crash you.

Implementations on Foreign Types§

Source§

impl RdRand for u8

Source§

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.

Source§

impl RdRand for u16

Source§

unsafe fn fill_random(&mut self) -> bool

Fills the 16-bit value with a random bit string

§Safety

Will crash if RDRAND instructions are not supported.

Source§

impl RdRand for u32

Source§

unsafe fn fill_random(&mut self) -> bool

Fills the 32-bit value with a random bit string

§Safety

Will crash if RDRAND instructions are not supported.

Source§

impl RdRand for u64

Source§

unsafe fn fill_random(&mut self) -> bool

Fills the 64-bit value with a random bit string

§Safety

Will crash if RDRAND instructions are not supported.

Implementors§