Documentation

The functions that this module exposes attempt to cast from one primitive integer type to another, returning None on overflow or underflow.

Examples

```rust use checkedintcast::CheckedIntCast;

// Returns None if usize has 32 or fewer bits (2u64 << 33).asusizechecked();

// Successful cast asserteq!(127u8.asi8_checked(), Some(127i8));

// Overflow asserteq!(255u8.asi8_checked(), None);

// Underflow asserteq!((-1i8).asu32_checked(), None); ```