[][src]Trait kernel::hil::entropy::Entropy8

pub trait Entropy8<'a> {
    fn get(&self) -> ReturnCode;
fn cancel(&self) -> ReturnCode;
fn set_client(&'a self, _: &'a dyn Client8); }

An 8-bit entropy generator.

Implementors should assume the client implements the Client8 trait.

Required methods

fn get(&self) -> ReturnCode

Initiate the acquisition of new entropy.

There are three valid return values:

  • SUCCESS: a entropy_available callback will be called in the future when entropy is available.
  • FAIL: a entropy_available callback will not be called in the future, because entropy cannot be generated. This is a general failure condition.
  • EOFF: a entropy_available callback will not be called in the future, because the entropy generator is off/not powered.

fn cancel(&self) -> ReturnCode

Cancel acquisition of entropy.

There are three valid return values:

  • SUCCESS: an outstanding request from get has been cancelled, or there was no outstanding request. No entropy_available callback will be issued.
  • FAIL:: There will be a entropy_available callback, which may or may not return an error code.

fn set_client(&'a self, _: &'a dyn Client8)

Set the client to receive entropy_available callbacks.

Loading content...

Implementors

Loading content...