overf
Define the overflow behavior of mathematical operations within blocks of code. This library provides the macros checked!, overflowing!, saturating!, propagating! and default!, enabling you to easily manage overflow in nested contexts.
Usage
use ;
checked!
overflowing!
Features
- Customizable Overflow Behavior: Choose between checked, overflowing, and saturating operations for any block of code.
- Nested Blocks: Define different overflow behaviors in nested blocks for more granular control.
- Reset Behavior: Use the
default!macro to reset the overflow behavior back to the default.
Installation
Add overf to your Cargo.toml:
[]
= "0.1"
Or run the following command:
cargo add overf