Expand description
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
.
Re-exports§
pub use Option::None;
pub use Option::Some;
pub use Result::Err;
pub use Result::Ok;
pub use bool;
pub use i128;
pub use i16;
pub use i32;
pub use i64;
pub use i8;
pub use isize;
pub use u128;
pub use u16;
pub use u32;
pub use u64;
pub use u8;
pub use usize;
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
. Requiresconst_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 returnsOption<()>
. ReturnsNone
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§
- A reference to the bits in an
InlAwi
,ExtAwi
,Awi
, or other backing construct. If a function is written just in terms ofBits
, it can work on mixed references to any of the storage structs and wrappers likeFP<B>
.const
big integer arithmetic is possible if the backing type isInlAwi
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 implementBorrow<Bits>
andBorrowMut<Bits>
. Adds on signedness and fixed-point information. Implements many traits ifB
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.
Enums§
- The
Option
type. See the module level documentation for more.
Functions§
- Utility free function for converting a
usize
to aNonZeroUsize
. This is mainly intended for usage with literals, and shouldn’t be used for fallible conversions.