numaxiom 0.0.2

Lightweight numeric marker traits for ranges/signs plus constants and ops; std by default, no_std optional.
Documentation
use super::HasMaxValue;

/// Provides the largest representable value for the type as a constant.
pub trait MaxValueConst: HasMaxValue {
    const MAX: Self;
}

macro_rules! impl_max_value_const {
    ($($ty:ty),+ $(,)?) => {
        $(
            impl MaxValueConst for $ty {
                const MAX: Self = <$ty>::MAX;
            }
        )+
    };
}

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