Crates.io | imp_int |
lib.rs | imp_int |
version | 0.3.1 |
source | src |
created_at | 2024-04-20 19:01:04.597537 |
updated_at | 2024-04-21 14:31:57.517051 |
description | A collection of thinly-wrapped integer types modelling IMP integer semantics |
homepage | |
repository | https://github.com/eikopf/impc |
max_upload_size | |
id | 1214795 |
size | 14,140 |
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.
# ordinary usage
cargo add imp_int
# usage with the bigint feature enabled
cargo add imp_int --features bigint