Trait kernel::hil::rng::Client [] [src]

pub trait Client {
    fn randomness_available(
        &self,
        randomness: &mut Iterator<Item = u32>
    ) -> Continue; }

An RNG client

Clients of an RNG must implement this trait.

Required Methods

Called by the (RNG)[trait.RNG.html] when there are one or more random numbers available

randomness in an Iterator of available random numbers. The amount of randomness available may increase if randomness is not consumed quickly so clients should not rely on iterator termination to finish consuming randomn numbers.

The client returns either Continue::More if the iterator did not have enough random values and the client would like to be called again when more is available, or Continue::Done.

Implementors