use core::num::{NonZeroI8, NonZeroI16, NonZeroI32, NonZeroI64, NonZeroI128, NonZeroIsize, NonZeroU8, NonZeroU16, NonZeroU32, NonZeroU64, NonZeroU128, NonZeroUsize};
use crate::{IntIncDecExt, non_zero_signed_omm, non_zero_signed_opp, non_zero_signed_wmm, non_zero_unsigned_omm, non_zero_unsigned_opp, non_zero_unsigned_wmm, non_zero_wpp};
impl IntIncDecExt for NonZeroI8
{
fn opp(&mut self) -> (Self, bool)
{
non_zero_signed_opp!(self, i8)
}
fn omm(&mut self) -> (Self, bool)
{
non_zero_signed_omm!(self, i8)
}
fn wpp(&mut self) -> Self
{
non_zero_wpp!(self, i8)
}
fn wmm(&mut self) -> Self
{
non_zero_signed_wmm!(self, i8)
}
}
impl IntIncDecExt for NonZeroI16
{
fn opp(&mut self) -> (Self, bool)
{
non_zero_signed_opp!(self, i16)
}
fn omm(&mut self) -> (Self, bool)
{
non_zero_signed_omm!(self, i16)
}
fn wpp(&mut self) -> Self
{
non_zero_wpp!(self, i16)
}
fn wmm(&mut self) -> Self
{
non_zero_signed_wmm!(self, i16)
}
}
impl IntIncDecExt for NonZeroI32
{
fn opp(&mut self) -> (Self, bool)
{
non_zero_signed_opp!(self, i32)
}
fn omm(&mut self) -> (Self, bool)
{
non_zero_signed_omm!(self, i32)
}
fn wpp(&mut self) -> Self
{
non_zero_wpp!(self, i32)
}
fn wmm(&mut self) -> Self
{
non_zero_signed_wmm!(self, i32)
}
}
impl IntIncDecExt for NonZeroI64
{
fn opp(&mut self) -> (Self, bool)
{
non_zero_signed_opp!(self, i64)
}
fn omm(&mut self) -> (Self, bool)
{
non_zero_signed_omm!(self, i64)
}
fn wpp(&mut self) -> Self
{
non_zero_wpp!(self, i64)
}
fn wmm(&mut self) -> Self
{
non_zero_signed_wmm!(self, i64)
}
}
impl IntIncDecExt for NonZeroI128
{
fn opp(&mut self) -> (Self, bool)
{
non_zero_signed_opp!(self, i128)
}
fn omm(&mut self) -> (Self, bool)
{
non_zero_signed_omm!(self, i128)
}
fn wpp(&mut self) -> Self
{
non_zero_wpp!(self, i128)
}
fn wmm(&mut self) -> Self
{
non_zero_signed_wmm!(self, i128)
}
}
impl IntIncDecExt for NonZeroIsize
{
fn opp(&mut self) -> (Self, bool)
{
non_zero_signed_opp!(self, isize)
}
fn omm(&mut self) -> (Self, bool)
{
non_zero_signed_omm!(self, isize)
}
fn wpp(&mut self) -> Self
{
non_zero_wpp!(self, isize)
}
fn wmm(&mut self) -> Self
{
non_zero_signed_wmm!(self, isize)
}
}
impl IntIncDecExt for NonZeroU8
{
fn opp(&mut self) -> (Self, bool)
{
non_zero_unsigned_opp!(self, u8)
}
fn omm(&mut self) -> (Self, bool)
{
non_zero_unsigned_omm!(self, u8)
}
fn wpp(&mut self) -> Self
{
non_zero_wpp!(self, u8)
}
fn wmm(&mut self) -> Self
{
non_zero_unsigned_wmm!(self, u8)
}
}
impl IntIncDecExt for NonZeroU16
{
fn opp(&mut self) -> (Self, bool)
{
non_zero_unsigned_opp!(self, u16)
}
fn omm(&mut self) -> (Self, bool)
{
non_zero_unsigned_omm!(self, u16)
}
fn wpp(&mut self) -> Self
{
non_zero_wpp!(self, u16)
}
fn wmm(&mut self) -> Self
{
non_zero_unsigned_wmm!(self, u16)
}
}
impl IntIncDecExt for NonZeroU32
{
fn opp(&mut self) -> (Self, bool)
{
non_zero_unsigned_opp!(self, u32)
}
fn omm(&mut self) -> (Self, bool)
{
non_zero_unsigned_omm!(self, u32)
}
fn wpp(&mut self) -> Self
{
non_zero_wpp!(self, u32)
}
fn wmm(&mut self) -> Self
{
non_zero_unsigned_wmm!(self, u32)
}
}
impl IntIncDecExt for NonZeroU64
{
fn opp(&mut self) -> (Self, bool)
{
non_zero_unsigned_opp!(self, u64)
}
fn omm(&mut self) -> (Self, bool)
{
non_zero_unsigned_omm!(self, u64)
}
fn wpp(&mut self) -> Self
{
non_zero_wpp!(self, u64)
}
fn wmm(&mut self) -> Self
{
non_zero_unsigned_wmm!(self, u64)
}
}
impl IntIncDecExt for NonZeroU128
{
fn opp(&mut self) -> (Self, bool)
{
non_zero_unsigned_opp!(self, u128)
}
fn omm(&mut self) -> (Self, bool)
{
non_zero_unsigned_omm!(self, u128)
}
fn wpp(&mut self) -> Self
{
non_zero_wpp!(self, u128)
}
fn wmm(&mut self) -> Self
{
non_zero_unsigned_wmm!(self, u128)
}
}
impl IntIncDecExt for NonZeroUsize
{
fn opp(&mut self) -> (Self, bool)
{
non_zero_unsigned_opp!(self, usize)
}
fn omm(&mut self) -> (Self, bool)
{
non_zero_unsigned_omm!(self, usize)
}
fn wpp(&mut self) -> Self
{
non_zero_wpp!(self, usize)
}
fn wmm(&mut self) -> Self
{
non_zero_unsigned_wmm!(self, usize)
}
}