[][src]Struct nrf52840_hal::Rng

pub struct Rng(_);

Interface to the RNG peripheral

Right now, this is very basic, only providing blocking interfaces.

Methods

impl Rng[src]

pub fn new(rng: RNG) -> Rng[src]

pub fn random(&mut self, buf: &mut [u8])[src]

Fill the provided buffer with random bytes

Will block until the buffer is full.

pub fn random_u8(&mut self) -> u8[src]

Return a random u8

pub fn random_u16(&mut self) -> u16[src]

Return a random u16

pub fn random_u32(&mut self) -> u32[src]

Return a random u32

pub fn random_u64(&mut self) -> u64[src]

Return a random u64

Trait Implementations

impl CryptoRng for Rng[src]

impl RngCore for Rng[src]

Auto Trait Implementations

impl Send for Rng

impl !Sync for Rng

impl Unpin for Rng

Blanket Implementations

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

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

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

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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.

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.