imp_int

Crates.ioimp_int
lib.rsimp_int
version0.3.1
sourcesrc
created_at2024-04-20 19:01:04.597537
updated_at2024-04-21 14:31:57.517051
descriptionA collection of thinly-wrapped integer types modelling IMP integer semantics
homepage
repositoryhttps://github.com/eikopf/impc
max_upload_size
id1214795
size14,140
oliver (eikopf)

documentation

README

imp_int

What is an integer newtype but a miserable pile of macros?

This crate provides the following thinly-wrapped types:

  • u8 => Imp8;
  • u16 => Imp16;
  • u32 => Imp32;
  • u64 => Imp64;
  • u128 => Imp128;
  • usize => ImpSize.

With the bigint feature enabled, it also provides the ImpBigInt type as a wrapper over the num_bigint::BigUint type to provide an arbitrary precision integer with IMP integer semantics.

Installation

# ordinary usage
cargo add imp_int

# usage with the bigint feature enabled
cargo add imp_int --features bigint
Commit count: 136

cargo fmt