#[derive(SaturatingAdd)]Expand description
Implements num::traits::SaturatingAdd for a struct by delegating to each field.
ยงExample
#[derive(SaturatingAdd)]
struct MyStruct(usize);adds
impl num::traits::SaturatingAdd for MyStruct {
fn saturating_add(&self, v: &Self) -> Self {
Self(self.0.saturating_add(&v.0))
}
}