numaxiom 0.0.2

Lightweight numeric marker traits for ranges/signs plus constants and ops; std by default, no_std optional.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
/// Marker for types that cannot represent infinity (positive or negative).
/// Implementers must ensure infinities cannot be produced or represented.
pub trait NonAnySignInfinity {}

macro_rules! impl_non_any_sign_infinity {
    ($($ty:ty),+ $(,)?) => {
        $(impl NonAnySignInfinity for $ty {})+
    };
}

impl_non_any_sign_infinity!(i8, i16, i32, i64, i128, isize);
impl_non_any_sign_infinity!(u8, u16, u32, u64, u128, usize);
impl_non_any_sign_infinity!(f32, f64);