pub trait PrimInt<const M: usize>: Sized {
// Required methods
fn to_bit_array(&self) -> [bool; M];
fn from_spec_constant<'st>(
spec_constant: &SpecConstant<'st>,
) -> Result<Self, ParseIntError>;
}Expand description
A primitive integer type that maps onto a bit-vector of width M.
Required Methods§
Sourcefn to_bit_array(&self) -> [bool; M]
fn to_bit_array(&self) -> [bool; M]
Convert this value into its big-endian bit-vector representation.
Sourcefn from_spec_constant<'st>(
spec_constant: &SpecConstant<'st>,
) -> Result<Self, ParseIntError>
fn from_spec_constant<'st>( spec_constant: &SpecConstant<'st>, ) -> Result<Self, ParseIntError>
Parse this value from a bit-vector literal (#x or #b).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".