use core::{u128, usize};


pub trait IncrementableId {
    fn min_value() -> Self;
    fn max_value() -> Self;
    fn next_value(prev: Self) -> Self;
}

impl IncrementableId for usize {
    fn min_value() -> Self { usize::MIN }
    fn max_value() -> Self { usize::MAX }
    fn next_value(prev: Self) -> Self {
        prev + 1
    }
}

impl IncrementableId for u8 {
    fn min_value() -> Self { u8::MIN }
    fn max_value() -> Self { u8::MAX }
    fn next_value(prev: Self) -> Self {
        prev + 1_u8
    }
}


impl IncrementableId for u16 {
    fn min_value() -> Self { u16::MIN }
    fn max_value() -> Self { u16::MAX }
    fn next_value(prev: Self) -> Self {
        prev + 1_u16
    }
}

impl IncrementableId for u32 {
    fn min_value() -> Self { u32::MIN }
    fn max_value() -> Self { u32::MAX }
    fn next_value(prev: Self) -> Self {
        prev + 1_u32
    }
}

impl IncrementableId for u64 {
    fn min_value() -> Self { u64::MIN }
    fn max_value() -> Self { u64::MAX }
    fn next_value(prev: Self) -> Self {
        prev + 1_u64
    }
}

impl IncrementableId for u128 {
    fn min_value() -> Self { u128::MIN }
    fn max_value() -> Self { u128::MAX }
    fn next_value(prev: Self) -> Self {
        prev + 1_u128
    }
}

