numaxiom 0.0.2

Lightweight numeric marker traits for ranges/signs plus constants and ops; std by default, no_std optional.
Documentation
/// Supplies a checked division that returns `None` on division by zero or overflow.
pub trait CheckedDiv<Rhs = Self> {
    type Output;

    fn checked_div(self, rhs: Rhs) -> Option<Self::Output>;
}

macro_rules! impl_checked_div {
    ($($ty:ty),+ $(,)?) => {
        $(impl CheckedDiv for $ty {
            type Output = $ty;

            #[inline]
            fn checked_div(self, rhs: Self) -> Option<Self::Output> {
                <$ty>::checked_div(self, rhs)
            }
        })+
    };
}

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