Enum rand::distributions::weighted::WeightedError [−][src]
pub enum WeightedError {
NoItem,
InvalidWeight,
AllWeightsZero,
TooMany,
}
Expand description
Error type returned from WeightedIndex::new
.
Variants
The provided weight collection contains no items.
A weight is either less than zero, greater than the supported maximum, NaN, or otherwise invalid.
All items in the provided weight collection are zero.
Too many weights are provided (length greater than u32::MAX
)
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for WeightedError
impl Send for WeightedError
impl Sync for WeightedError
impl Unpin for WeightedError
impl UnwindSafe for WeightedError
Blanket Implementations
Mutably borrows from an owned value. Read more