Struct nrf52840_hal::rng::Rng
source · pub struct Rng(_);
Expand description
Interface to the RNG peripheral
Right now, this is very basic, only providing blocking interfaces.
Implementations
sourceimpl Rng
impl Rng
sourcepub fn random(&mut self, buf: &mut [u8])
pub fn random(&mut self, buf: &mut [u8])
Fill the provided buffer with random bytes
Will block until the buffer is full.
sourcepub fn random_u16(&mut self) -> u16
pub fn random_u16(&mut self) -> u16
Return a random u16
sourcepub fn random_u32(&mut self) -> u32
pub fn random_u32(&mut self) -> u32
Return a random u32
sourcepub fn random_u64(&mut self) -> u64
pub fn random_u64(&mut self) -> u64
Return a random u64
Auto Trait Implementations
impl RefUnwindSafe for Rng
impl Send for Rng
impl !Sync for Rng
impl Unpin for Rng
impl UnwindSafe for Rng
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more