Struct rand::distributions::Weighted [−][src]
pub struct Weighted<T> {
pub weight: u32,
pub item: T,
}Expand description
A value with a particular weight for use with WeightedChoice.
Fields
weight: u32The numerical weight of this item
item: TThe actual item which is being weighted
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for Weighted<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for Weighted<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
