reweb3-num 0.2.4

Arbitrary precision, fixed-size signed and unsigned integer types for ethereum, this a fork of bnum crate.
Documentation
use crate::ExpType;
use core::ops::{
    Add, AddAssign, BitAnd, BitAndAssign, BitOr, BitOrAssign, BitXor, BitXorAssign, Div, DivAssign,
    Mul, MulAssign, Neg, Not, Rem, RemAssign, Shl, ShlAssign, Shr, ShrAssign, Sub, SubAssign,
};

macro_rules! ops {
    ($BUint: ident, $BInt: ident, $Digit: ident) => {
        crate::nightly::impl_const! {
            impl<const N: usize> const Neg for $BInt<N> {
                type Output = Self;

                #[inline]
                fn neg(self) -> Self {
                    Self::neg(self)
                }
            }
        }

        crate::nightly::impl_const! {
            impl<const N: usize> const Neg for &$BInt<N> {
                type Output = $BInt<N>;

                #[inline]
                fn neg(self) -> $BInt<N> {
                    $BInt::neg(*self)
                }
            }
        }

        crate::nightly::impl_const! {
            impl<const N: usize> const BitAnd for $BInt<N> {
                type Output = Self;

                #[inline]
                fn bitand(self, rhs: Self) -> Self {
                    Self::bitand(self, rhs)
                }
            }
        }

        crate::nightly::impl_const! {
            impl<const N: usize> const BitOr for $BInt<N> {
                type Output = Self;

                #[inline]
                fn bitor(self, rhs: Self) -> Self {
                    Self::bitor(self, rhs)
                }
            }
        }

        crate::nightly::impl_const! {
            impl<const N: usize> const BitXor for $BInt<N> {
                type Output = Self;

                #[inline]
                fn bitxor(self, rhs: Self) -> Self {
                    Self::bitxor(self, rhs)
                }
            }
        }

        crate::nightly::impl_const! {
            impl<const N: usize> const Div for $BInt<N> {
                type Output = Self;

                #[inline]
                fn div(self, rhs: Self) -> Self {
                    Self::div(self, rhs)
                }
            }
        }

        crate::nightly::impl_const! {
            impl<const N: usize> const Not for $BInt<N> {
                type Output = Self;

                fn not(self) -> Self {
                    Self::not(self)
                }
            }
        }

        crate::nightly::impl_const! {
            impl<const N: usize> const Rem for $BInt<N> {
                type Output = Self;

                #[inline]
                fn rem(self, rhs: Self) -> Self {
                    Self::rem(self, rhs)
                }
            }
        }

        crate::int::ops::impls!($BInt, $BUint, $BInt);
    };
}

crate::macro_impl!(ops);