pub fn populate_from_source<A, W, I>(
framework: &mut WeightedFramework<A>,
pairs: I,
source: &W,
) -> Result<(), Error>Expand description
Populate a WeightedFramework from a list of attack pairs, pulling
each weight from the provided WeightSource. Pairs for which the
source returns None are skipped. Pairs for which the source
returns an invalid weight propagate an Error::InvalidWeight.
This is a convenience builder. Consumers that need more control
(e.g., different sources for different attack types) should call
add_weighted_attack directly.