Trait Weight
pub trait Weight: Clone
Bounds on a weight
See usage in WeightedIndex.
Associated Constants
const ZERO: Self;Representation of 0
Required Methods
fn checked_add_assign(&mut self, v: &Self) -> Result<(), ()>Checked addition
Result::Ok: On success,vis added toselfResult::Err: Returns an error whenSelfcannot represent the result ofself + v(i.e. overflow). The value ofselfshould be discarded.