Skip to main content

_embedded_hal_blocking_rng_Read

Trait _embedded_hal_blocking_rng_Read 

Source
pub trait _embedded_hal_blocking_rng_Read {
    type Error;

    // Required method
    fn read(&mut self, buffer: &mut [u8]) -> Result<(), Self::Error>;
}
Available on crate features mcu-atmega and unproven only.
Expand description

Blocking read

This trait is available if embedded-hal is built with the "unproven" feature.

Required Associated Types§

Source

type Error

Error type

Required Methods§

Source

fn read(&mut self, buffer: &mut [u8]) -> Result<(), Self::Error>

Reads enough bytes from hardware random number generator to fill buffer

If any error is encountered then this function immediately returns. The contents of buf are unspecified in this case.

If this function returns an error, it is unspecified how many bytes it has read, but it will never read more than would be necessary to completely fill the buffer.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§