Trait libafl_bolts::rands::Rand
source · pub trait Rand: Debug + Serialize + DeserializeOwned {
// Required methods
fn set_seed(&mut self, seed: u64);
fn next(&mut self) -> u64;
// Provided methods
fn below(&mut self, upper_bound_excl: u64) -> u64 { ... }
fn between(&mut self, lower_bound_incl: u64, upper_bound_incl: u64) -> u64 { ... }
fn choose<I, E, T>(&mut self, from: I) -> T
where I: IntoIterator<Item = T, IntoIter = E>,
E: ExactSizeIterator + Iterator<Item = T> { ... }
}
Expand description
Ways to get random around here. Please note that these are not cryptographically secure. Or, even if some might be by accident, at least they are not seeded in a cryptographically secure fashion.
Required Methods§
Provided Methods§
sourcefn below(&mut self, upper_bound_excl: u64) -> u64
fn below(&mut self, upper_bound_excl: u64) -> u64
Gets a value below the given 64 bit val (exclusive)
sourcefn between(&mut self, lower_bound_incl: u64, upper_bound_incl: u64) -> u64
fn between(&mut self, lower_bound_incl: u64, upper_bound_incl: u64) -> u64
Gets a value between the given lower bound (inclusive) and upper bound (inclusive)
Object Safety§
This trait is not object safe.