Trait const_arithmetic::TypedLeq
source · 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);