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§

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

Structs§

Awi
An arbitrary width integer with manually controlled bitwidth.
Bits
A reference to the bits in an InlAwi, ExtAwi, Awi, or other backing construct.
ExtAwi
An arbitrary width integer with manually controlled bitwidth. Most arithmetic is wrapping like Rust’s integers. All reallocations are explicit.
FP
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.
FPType
Fixed-Point Type, containing signedness, bitwidth, and fixed point
InlAwi
An arbitrary width integer with const generic bitwidth that can be stored inline on the stack like an array.
OrdBits
A wrapper implementing total ordering

Enums§

SerdeError
A serialization or deserialization error

Functions§

bw
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.