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

A trait that returns a binary depending on whether two integers are less or 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: TypedLeq<TypedInteger<_3, _0, _0, _0, _0, _0, _0, _0>, Output = R>,
R: AssertTrue,
T: TypedLeq<TypedInteger<_5, _0, _0, _0, _0, _0, _0, _0>, Output = S>,
S: AssertTrue
{}
 
example(a);

Required Associated Types§

Implementors§

source§

impl<N: IsInteger, H0: Hex, H1: Hex, H2: Hex, H3: Hex, H4: Hex, H5: Hex, H6: Hex, H7: Hex, B0, B1: Binary, B2: Binary> TypedLeq<N> for TypedInteger<H0, H1, H2, H3, H4, H5, H6, H7>where TypedInteger<H0, H1, H2, H3, H4, H5, H6, H7>: TypedLessThan<N, Output = B0> + TypedEqual<N, Output = B1>, B0: BinOr<B1, Output = B2> + Binary,

§

type Output = B2