weighted_list/
root.rs

1use std::*;
2
3use num_traits as nums;
4
5
6/// Any general numerical type, such as `u32`, `usize`, `f64`. The type `W` of item weights in a [`WeightedList<V,W>`](crate::WeightedList) implement this trait.
7pub trait Weight:
8      Copy
9    + nums::NumAssign
10    + nums::NumCast
11    + PartialOrd
12    + iter::Sum
13    + fmt::Debug
14{}
15
16impl<Type> Weight for Type where Type:
17      Copy
18    + nums::NumAssign
19    + nums::NumCast
20    + PartialOrd
21    + iter::Sum
22    + fmt::Debug
23{}