pub trait HexAdd3<H1: Hex, H2: Hex> {
type Output: Hex;
type Carry: Hex;
}
Expand description
This is an internal implementation of addition of three number
Example
use const_arithmetic::*;
let a = _5;
let b = _6;
let c = _7;
let result = _2;
let overflow = _1;
fn hex_add<H1, H2, H3, B, C>(_h1: H1, _h2: H2, _h3: H3, _b: B, _c: C) where
H1: Hex,
H2: Hex,
H3: Hex,
B: Hex,
C: Hex,
H1: HexAdd3<H2, H3, Output = B, Carry = C>
{}
hex_add(a, b, c, result, overflow);