Struct capsules::rng::SimpleRng
[−]
[src]
pub struct SimpleRng<'a, RNG: RNG + 'a> { rng: &'a RNG, apps: Grant<App>, getting_randomness: Cell<bool>, }
Fields
rng: &'a RNG
apps: Grant<App>
getting_randomness: Cell<bool>
Methods
impl<'a, RNG: RNG> SimpleRng<'a, RNG>
[src]
Trait Implementations
impl<'a, RNG: RNG> Client for SimpleRng<'a, RNG>
[src]
fn randomness_available(
&self,
randomness: &mut Iterator<Item = u32>
) -> Continue
[src][−]
&self,
randomness: &mut Iterator<Item = u32>
) -> Continue
Called by the (RNG)[trait.RNG.html] when there are one or more random numbers available Read more
impl<'a, RNG: RNG> Driver for SimpleRng<'a, RNG>
[src]
fn allow(
&self,
appid: AppId,
allow_num: usize,
slice: AppSlice<Shared, u8>
) -> ReturnCode
[src][−]
&self,
appid: AppId,
allow_num: usize,
slice: AppSlice<Shared, u8>
) -> ReturnCode
allow
lets an application give the driver access to a buffer in the application's memory. This returns ENOSUPPORT
if not used. Read more
fn subscribe(&self, subscribe_num: usize, callback: Callback) -> ReturnCode
[src][−]
subscribe
lets an application pass a callback to the driver to be called later. This returns ENOSUPPORT
if not used. Read more
fn command(
&self,
command_num: usize,
data: usize,
_: usize,
appid: AppId
) -> ReturnCode
[src][−]
&self,
command_num: usize,
data: usize,
_: usize,
appid: AppId
) -> ReturnCode
command
instructs a driver to perform some action synchronously. This returns ENOSUPPORT
if not used. Read more