pub enum Distribution {
AllEqual,
AllUnique,
Sorted,
ReverseSorted,
Alternating,
AdversarialHash,
Random,
HalfAndHalf,
Sparse,
Dense,
}Expand description
Value distribution patterns for test data generation.
Variants§
AllEqual
AllUnique
Sorted
ReverseSorted
Alternating
AdversarialHash
Random
HalfAndHalf
Sparse
Dense
Implementations§
Source§impl Distribution
impl Distribution
Sourcepub fn all() -> Vec<Distribution>
pub fn all() -> Vec<Distribution>
Get all distribution variants.
Sourcepub fn generate_u32(&self, count: usize, seed: u64) -> Vec<u32>
pub fn generate_u32(&self, count: usize, seed: u64) -> Vec<u32>
Generate u32 values with this distribution.
Sourcepub fn generate_i64(&self, count: usize, seed: u64) -> Vec<i64>
pub fn generate_i64(&self, count: usize, seed: u64) -> Vec<i64>
Generate i64 values with this distribution.
Trait Implementations§
Source§impl Clone for Distribution
impl Clone for Distribution
Source§fn clone(&self) -> Distribution
fn clone(&self) -> Distribution
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Distribution
impl Debug for Distribution
Source§impl PartialEq for Distribution
impl PartialEq for Distribution
impl Copy for Distribution
impl Eq for Distribution
impl StructuralPartialEq for Distribution
Auto Trait Implementations§
impl Freeze for Distribution
impl RefUnwindSafe for Distribution
impl Send for Distribution
impl Sync for Distribution
impl Unpin for Distribution
impl UnsafeUnpin for Distribution
impl UnwindSafe for Distribution
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more