# _embedded_hal_blocking_rng_Read in k210_hal::prelude - Rust
Blocking read
Keywords: rust, rustlang, rust-lang, _embedded_hal_blocking_rng_Read

# Trait k210_hal::prelude::_embedded_hal_blocking_rng_Read

source · [−]

    pub trait _embedded_hal_blocking_rng_Read {
        type Error;
        fn try_read(&mut self, buffer: &mut [u8]) -> Result<(), Self::Error>;
    }

Expand description

Blocking read

## Associated Types

source

#### type Error

Error type

## Required methods

source

#### fn try_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.

## Implementors