pub trait Sum {
// Required method
fn sum(self, other: Self) -> Self;
}
Expand description
Trait defining the sum of two numbers.
For bool
this is the same as boolean OR; otherwise it’s the same as Add
.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.