Trait TypedLessThan

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

A trait that returns a binary depending on whether a < b

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: TypedLessThan<TypedInteger<_3, _0, _0, _0, _0, _0, _0, _0>, Output = R>,
R: AssertFalse,
T: TypedLessThan<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, R: Binary> TypedLessThan<N> for TypedInteger<H0, H1, H2, H3, H4, H5, H6, H7>
where TypedInteger<H0, H1, H2, H3, H4, H5, H6, H7>: _LessThan<N, Output = R>,