[−][src]Struct nrf52832_hal::Rng
Interface to the RNG peripheral
Right now, this is very basic, only providing blocking interfaces.
Implementations
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]
fn next_u32(&mut self) -> u32
[src]
fn next_u64(&mut self) -> u64
[src]
fn fill_bytes(&mut self, dest: &mut [u8])
[src]
fn try_fill_bytes(&mut self, dest: &mut [u8]) -> Result<(), Error>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,