light_ranged_integers 0.1.1

A Rust library similar to ranged_integers, a bit limited to work on stable rust
Documentation
/*
Copyright © 2024 - Massimo Gismondi

This file is part of light-ranged-integers.

light-ranged-integers is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

light-ranged-integers is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with light-ranged-integers.  If not, see <http://www.gnu.org/licenses/>.
*/

#![doc = include_str!("../README.md")]

use paste::paste;

#[cfg(test)]
mod tests;

#[macro_use]
mod clamp_mode;
#[macro_use]
mod panic_mode;
#[macro_use]
mod wrap_mode;

mod ranged;
pub use ranged::*;

pub mod op_mode;

gen_panic_impl!(u8);
gen_clamp_impl!(u8);

gen_panic_impl!(u16);
gen_clamp_impl!(u16);

gen_panic_impl!(u32);
gen_clamp_impl!(u32);

gen_panic_impl!(u64);
gen_clamp_impl!(u64);

gen_panic_impl!(i8);
gen_clamp_impl!(i8);

gen_panic_impl!(i16);
gen_clamp_impl!(i16);

gen_panic_impl!(i32);
gen_clamp_impl!(i32);

gen_panic_impl!(i64);
gen_clamp_impl!(i64);