Struct x86_64::instructions::random::RdRand[][src]

pub struct RdRand(_);
Expand description

Used to obtain random numbers using x86_64’s RDRAND opcode

Implementations

impl RdRand[src]

pub fn new() -> Option<Self>[src]

Creates Some(RdRand) if RDRAND is supported, None otherwise

pub fn get_u64(self) -> Option<u64>[src]

Uniformly sampled u64. May fail in rare circumstances or heavy load.

pub fn get_u32(self) -> Option<u32>[src]

Uniformly sampled u32. May fail in rare circumstances or heavy load.

pub fn get_u16(self) -> Option<u16>[src]

Uniformly sampled u16. May fail in rare circumstances or heavy load.

Trait Implementations

impl Clone for RdRand[src]

fn clone(&self) -> RdRand[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for RdRand[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl Copy for RdRand[src]

Auto Trait Implementations

impl Send for RdRand

impl Sync for RdRand

impl Unpin for RdRand

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.