Trait IsInteger

Source
pub trait IsInteger: Copy {
    type Hex0: Hex;
    type Hex1: Hex;
    type Hex2: Hex;
    type Hex3: Hex;
    type Hex4: Hex;
    type Hex5: Hex;
    type Hex6: Hex;
    type Hex7: Hex;

    // Required method
    fn number() -> u32;
}
Expand description

A trait that denotes whether something is an integer Example

use const_arithmetic::*;
let a = parse_integer!(3);
 
// This verifies that a is 3
fn is_3<T>(_a: T) where
T: IsInteger,
T: TypedAssertEqual<TypedInteger<_3, _0, _0, _0, _0, _0, _0, _0>>
{}
 
is_3(a);

Required Associated Types§

Required Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<H0: Hex, H1: Hex, H2: Hex, H3: Hex, H4: Hex, H5: Hex, H6: Hex, H7: Hex> IsInteger for TypedInteger<H0, H1, H2, H3, H4, H5, H6, H7>

Source§

type Hex0 = H0

Source§

type Hex1 = H1

Source§

type Hex2 = H2

Source§

type Hex3 = H3

Source§

type Hex4 = H4

Source§

type Hex5 = H5

Source§

type Hex6 = H6

Source§

type Hex7 = H7