# _embedded_hal_rng_Read in k210_hal::prelude - Rust
Nonblocking stream of random bytes.
Keywords: rust, rustlang, rust-lang, _embedded_hal_rng_Read

# Trait k210_hal::prelude::_embedded_hal_rng_Read

source · [−]

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

Expand description

Nonblocking stream of random bytes.

## Associated Types

source

#### type Error

An enumeration of RNG errors.

For infallible implementations, will be `Infallible`

## Required methods

source

#### fn try_read(&mut self, buf: &mut [ u8 ]) -> Result<usize, Error<Self::Error>>

Get a number of bytes from the RNG.

## Implementors