pub trait TypedEqual<N: IsInteger> {
    type Output: Binary;
}
Expand description

A trait that returns a binary depending on whether two integers are equal

Example

use const_arithmetic::*;
let a = parse_integer!(3);
 
// This verifies that a <= 5 but not a < 3
fn example<T, R, S>(_a: T) where
T: IsInteger,
R: Binary,
S: Binary,
T: TypedEqual<TypedInteger<_3, _0, _0, _0, _0, _0, _0, _0>, Output = R>,
R: AssertTrue,
T: TypedEqual<TypedInteger<_5, _0, _0, _0, _0, _0, _0, _0>, Output = S>,
S: AssertFalse
{}
 
example(a);

Required Associated Types§

Implementors§

source§

impl<N: IsInteger, H0, H1, H2, H3, H4, H5, H6, H7, B0, B1: Binary, B2: Binary, B3: Binary, B4: Binary, B5: Binary, B6: Binary, B7: Binary, R: Binary> TypedEqual<N> for TypedInteger<H0, H1, H2, H3, H4, H5, H6, H7>where H0: HexEqual<N::Hex0, Output = B0> + Hex, H1: HexEqual<N::Hex1, Output = B1> + Hex, H2: HexEqual<N::Hex2, Output = B2> + Hex, H3: HexEqual<N::Hex3, Output = B3> + Hex, H4: HexEqual<N::Hex4, Output = B4> + Hex, H5: HexEqual<N::Hex5, Output = B5> + Hex, H6: HexEqual<N::Hex6, Output = B6> + Hex, H7: HexEqual<N::Hex7, Output = B7> + Hex, B0: BinMultiAnd<B1, B2, B3, B4, B5, B6, B7, Output = R> + Binary,

§

type Output = R