Exint - Exotic Integer Types
A pure Rust implementation of generic signed and unsigned integers.
This crate provides the no_std-compatible types int<N> and uint<N>, which mimic the behavior and API of the core integer primitives while supporting fixed-width values of arbitrary precision.
[]
= "0.1.0"
Basic example
use u24;
Literals
Since there is no way to define your own literal format in Rust, exint provides a simple procedural macro.
The above example can be re-written as the following:
use u24;
Use the exint::uint_strict! macro to avoid converting the core integer types.
use uint;
Security
This crate is not intended for cryptographic use. Consider using crypto-bigint if you need an integer type suitable for cryptographic applications.
Features
| Group | Name | Nightly |
|---|---|---|
std |
no | |
all_unstable |
||
exact_bitshifts |
no | |
int_from_ascii |
no | |
int_lowest_highest_one |
no | |
int_roundings |
no | |
is_ascii_octdigit |
no | |
isolate_most_least_significant_one |
no | |
uint_bit_width |
no | |
utf16_extra |
no | |
wrapping_next_power_of_two |
no | |
all_nightly |
||
adt_const_params |
yes | |
ascii_char |
yes | |
bigint_helper_methods |
yes | |
disjoint_bitor |
yes | |
exact_div |
yes | |
f16 |
yes | |
f128 |
yes | |
funnel_shifts |
yes | |
integer_atomics |
yes | |
never_type |
yes | |
random |
yes | |
step_trait |
yes | |
structural_match |
yes | |
trusted_step |
yes | |
unsized_const_params |
yes | |
all_const |
||
const_traits |
yes | |
const_clone |
yes | |
const_cmp |
yes | |
const_convert |
yes | |
const_default |
yes | |
const_ops |
yes | |
const_option |
yes | |
const_result |
yes | |
all_backend |
||
core_intrinsics |
yes | |
const_eval_select |
yes | |
min_specialization |
yes | |
portable_simd |
yes | |
proc_macro_diagnostic |
yes |