Crate awint

source ·
Expand description

This crate compiles all the interfaces of awint_core, awint_macros, and awint_ext (when the default “alloc” feature is enabled). Enabling the “dag” feature flag also enables the dag module and a reexport of awint_dag. There are also hidden developer reexports.

Modules§

  • Reexports all the regular arbitrary width integer structs, macros, common enums, and most of core::primitive::*. This is useful for glob importing everything or for when using the regular items in a context with structs imported from awint_dag.
  • Fixed point related items
  • Reexports items defined within the awint crate system

Macros§

  • A concatenations of components macro, additionally using the source value to construct an Awi. See the crate documentation for more.
  • A concatenations of components macro, additionally using the source value to construct a &'static Bits. Requires const_support and some feature flags to work. See the crate documentation for more.
  • Copy Corresponding Concatenations of Components Dynamically. Takes concatenations of components as an input, and copies bits of the source to corresponding bits of the sinks. Returns () if the operation is infallible, otherwise returns Option<()>. Returns None if component indexes are out of bounds or if concatenation bitwidths mismatch. Performs allocation in general, but will try to avoid allocation if the common bitwdith can be determined statically, or if concatenations are all of single components. See the crate documentation for more.
  • A concatenations of components macro, additionally using the source value to construct an ExtAwi. See the crate documentation for more.
  • A concatenations of components macro, additionally using the source value to construct an InlAwi. See the crate documentation for more.
  • Specifies an InlAwi type in terms of its bitwidth

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.