Struct rand::distributions::Weighted
[−]
[src]
pub struct Weighted<T> { pub weight: u32, pub item: T, }
A value with a particular weight for use with WeightedChoice
.
Fields
weight: u32
The numerical weight of this item
item: T
The actual item which is being weighted
Trait Implementations
impl<T> Debug for Weighted<T> where
T: Debug,
[src]
T: Debug,
fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter. Read more
impl<T> Copy for Weighted<T> where
T: Copy,
[src]
T: Copy,
impl<T> Clone for Weighted<T> where
T: Clone,
[src]
T: Clone,