pub trait Unit: Copy + Debug {
fn is_self_compatible(&self, rhs: &Self) -> bool { ... }
}
Provided Methods
fn is_self_compatible(&self, rhs: &Self) -> bool
fn is_self_compatible(&self, rhs: &Self) -> bool
When for example adding two numbers together. The two unit types need to be checked if both sides are compatible with each other. If this returns false the function will panic saying the units are not compatible.