Expand description
This crate compiles all the interfaces of awint_core
, awint_ext
, and
awint_macros
.
Modules
Reexports every user-intended macro, structure, and function except for
SerdeError
.
Macros
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 nothing 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 documentation of awint_macros
for more.
The same as cc!
but with
Signed-maximum-value
specified initialization.
The same as cc!
but with
Signed-minimum-value
specified initialization.
The same as cc!
but with
Unsigned-maximum-value
specified initialization.
The same as cc!
but with
Unsigned-one-value
specified initialization.
The same as cc!
but with
Zero-value
specified initialization.
Takes concatenations of components as an input, and copies bits of the
source to corresponding bits of the sinks. The source value is also used to
construct an ExtAwi
. The common width must be dynamically determinable by
the macro (e.g. not all concatenations can have unbounded fillers), and the
source cannot contain fillers. Returns a plain ExtAwi
if infallible from
what the macro can statically determine, otherwise returns Option<ExtAwi>
.
Returns None
if component indexes are invalid or if concatenation
bitwidths mismatch. See the documentation of awint_macros
for more.
The same as extawi!
but with
Signed-maximum-value
specified initialization.
The same as extawi!
but with
Signed-minimum-value
specified initialization.
The same as extawi!
but with
Unsigned-maximum-value
specified initialization.
The same as extawi!
but with
Unsigned-one-value
specified initialization.
The same as extawi!
but with
Zero-value
specified initialization.
Takes concatenations of components as an input, and copies bits of the
source to corresponding bits of the sinks. The source value is also used to
construct an InlAwi
. The common width must be statically determinable by
the macro (e.g. at least one concatenation must have only literal ranges),
and the source cannot contain fillers. Returns a plain InlAwi
if
infallible from what the macro can statically determine, otherwise returns
Option<InlAwi>
. Returns None
if component indexes are invalid or if
concatenation bitwidths mismatch. See the documentation of awint_macros
for more.
The same as inlawi!
but with
Signed-maximum-value
specified initialization.
The same as inlawi!
but with
Signed-minimum-value
specified initialization.
Specifies an InlAwi
type in terms of its bitwidth as a usize
literal.
The same as inlawi!
but with
Unsigned-maximum-value
specified initialization.
The same as inlawi!
but with
Unsigned-one-value
specified initialization.
The same as inlawi!
but with
Zero-value
specified initialization.
Structs
A reference to the bits in an InlAwi
, ExtAwi
, or other backing
construct. This allows the same functions that operate on a dynamic ExtAwi
at runtime to also operate on an InlAwi
at compile time.
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.
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.