pub type WItem<V, W> = WeightedItem<V, W>;Expand description
A shorthand for WeightedItem.
If you refer to WeightedItem prolifically in your code, you may wish to use this for brevity. Otherwise, the full WeightedItem is recommended for clarity.
Aliased Type§
pub struct WItem<V, W> {
pub weight: W,
pub value: V,
}Fields§
§weight: WThe weight of the item. A positive number. 0 is technically valid, but not advised.
§Notes
num_traits::Unsignedis not enforced because this is incompatible with non-integerW(f32,f64, etc.) which are always signed.
value: VThe value stored in the item.