Crate awint_ext

source ·
Expand description

Externally allocated arbitrary width integers

This crate contains storage types with external storage, ExtAwi and Awi, to go along with InlAwi in the awint_core crate. This crate is separate because it requires support for alloc. Also includes FP because it practically requires allocation to use. This crate is intended to be used through the main awint crate, available with the “alloc” feature.

Modules§

  • Subset of awint::awi
  • Fixed point related items

Structs§

  • An arbitrary width integer with manually controlled bitwidth. This is different from ExtAwi and InlAwi in that it has a capacity, meaning that its bitwidth can be changed without reallocation if the capacity is large enough.
  • A reference to the bits in an InlAwi, ExtAwi, Awi, or other backing construct. If a function is written just in terms of Bits, it can work on mixed references to any of the storage structs and wrappers like FP<B>. const big integer arithmetic is possible if the backing type is InlAwi and the “const_support” flag is enabled.
  • An arbitrary width integer with manually controlled bitwidth. Most arithmetic is wrapping like Rust’s integers. All reallocations are explicit.
  • Fixed-Point generic struct for B that implement Borrow<Bits> and BorrowMut<Bits>. Adds on signedness and fixed-point information. Implements many traits if B also implements them.
  • Fixed-Point Type, containing signedness, bitwidth, and fixed point
  • An arbitrary width integer with const generic bitwidth that can be stored inline on the stack like an array.
  • A wrapper implementing total ordering

Enums§

  • A serialization or deserialization error

Functions§

  • Utility free function for converting a usize to a NonZeroUsize. This is mainly intended for usage with literals, and shouldn’t be used for fallible conversions.