BitVecValueMutRef

Struct BitVecValueMutRef 

Source
pub struct BitVecValueMutRef<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> BitVecValueMutRef<'a>

Source

pub fn new(width: WidthInt, words: &'a mut [Word]) -> Self

Trait Implementations§

Source§

impl BitVecMutOps for BitVecValueMutRef<'_>

Source§

fn words_mut(&mut self) -> &mut [Word]

Source§

fn add_in_place(&mut self, lhs: &impl BitVecOps, rhs: &impl BitVecOps)

Source§

fn sub_in_place(&mut self, lhs: &impl BitVecOps, rhs: &impl BitVecOps)

Source§

fn shift_left_in_place(&mut self, lhs: &impl BitVecOps, rhs: &impl BitVecOps)

Source§

fn shift_right_in_place(&mut self, lhs: &impl BitVecOps, rhs: &impl BitVecOps)

Source§

fn arithmetic_shift_right_in_place( &mut self, lhs: &impl BitVecOps, rhs: &impl BitVecOps, )

Source§

fn mul_in_place(&mut self, lhs: &impl BitVecOps, rhs: &impl BitVecOps)

Source§

fn and_in_place(&mut self, lhs: &impl BitVecOps, rhs: &impl BitVecOps)

Source§

fn or_in_place(&mut self, lhs: &impl BitVecOps, rhs: &impl BitVecOps)

Source§

fn xor_in_place(&mut self, lhs: &impl BitVecOps, rhs: &impl BitVecOps)

Source§

fn concat_in_place(&mut self, lhs: &impl BitVecOps, rhs: &impl BitVecOps)

Source§

fn slice_in_place(&mut self, src: &impl BitVecOps, msb: WidthInt, lsb: WidthInt)

Source§

fn not_in_place(&mut self)

Source§

fn negate_in_place(&mut self)

Source§

fn sign_extend_in_place(&mut self, src: &impl BitVecOps, by: WidthInt)

Source§

fn zero_extend_in_place(&mut self, src: &impl BitVecOps, by: WidthInt)

Source§

fn assign<'a>(&mut self, value: impl Into<BitVecValueRef<'a>>)

Source§

fn mask_msb(&mut self)

ensures that all unused bits in the most significant word are set to zero
Source§

fn clear(&mut self)

sets all bits to zero
Source§

fn assign_ones(&mut self)

sets all bits to one
Source§

fn assign_from_u64(&mut self, value: u64)

Source§

fn assign_from_u128(&mut self, value: u128)

Source§

fn assign_from_i64(&mut self, value: i64)

Source§

fn assign_from_str_radix( &mut self, value: &str, radix: u32, ) -> Result<(), ParseIntError>

Source§

fn set_bit(&mut self, pos: WidthInt)

Source§

fn clear_bit(&mut self, pos: WidthInt)

Source§

impl BitVecOps for BitVecValueMutRef<'_>

Source§

fn width(&self) -> WidthInt

Source§

fn words(&self) -> &[Word]

Source§

fn to_bit_str(&self) -> String

Convert to a string of 1s and 0s.
Source§

fn to_bit_str_signed(&self) -> String

Convert to a string of 1s and 0s with a - if the value is negative.
Source§

fn to_hex_str(&self) -> String

Convert to a string of hex characters
Source§

fn to_dec_str(&self) -> String

Convert to a string of a decimal number. No leading zeros.
Source§

fn to_hex_str_signed(&self) -> String

Convert to a string of hex characters with a - if the value is negative.
Source§

fn to_bytes_le(&self) -> Vec<u8>

Source§

fn to_bool(&self) -> Option<bool>

Returns value as a bool iff the value is a 1-bit value.
Source§

fn to_u64(&self) -> Option<u64>

Returns the value as a 64-bit unsigned integer if the value can be represented
Source§

fn to_i64(&self) -> Option<i64>

Returns the value as a 64-bit signed integer if the value can be represented
Source§

fn is_true(&self) -> bool

Source§

fn is_false(&self) -> bool

Source§

fn is_zero(&self) -> bool

Source§

fn is_one(&self) -> bool

Source§

fn is_all_ones(&self) -> bool

Source§

fn is_negative(&self) -> bool

Source§

fn is_pow_2(&self) -> Option<WidthInt>

Source§

fn min_width(&self) -> WidthInt

Computes the minimum number of bits that are necessary to represent the current value. This corresponds to the position of the most significant 1 plus one.
Source§

fn bit_set_intervals(&self) -> Vec<Range<WidthInt>>

Computes all ranges for which the bits are one.
Source§

fn add<R: BitVecOps>(&self, rhs: &R) -> BitVecValue

Source§

fn sub<R: BitVecOps>(&self, rhs: &R) -> BitVecValue

Source§

fn shift_left<R: BitVecOps>(&self, rhs: &R) -> BitVecValue

Source§

fn shift_right<R: BitVecOps>(&self, rhs: &R) -> BitVecValue

Source§

fn arithmetic_shift_right<R: BitVecOps>(&self, rhs: &R) -> BitVecValue

Source§

fn mul<R: BitVecOps>(&self, rhs: &R) -> BitVecValue

Source§

fn and<R: BitVecOps>(&self, rhs: &R) -> BitVecValue

Source§

fn or<R: BitVecOps>(&self, rhs: &R) -> BitVecValue

Source§

fn xor<R: BitVecOps>(&self, rhs: &R) -> BitVecValue

Source§

fn is_equal<R: BitVecOps + ?Sized>(&self, rhs: &R) -> bool

Source§

fn is_not_equal<R: BitVecOps + ?Sized>(&self, rhs: &R) -> bool

Source§

fn is_greater<R: BitVecOps + ?Sized>(&self, rhs: &R) -> bool

Source§

fn is_greater_or_equal<R: BitVecOps + ?Sized>(&self, rhs: &R) -> bool

Source§

fn is_less<R: BitVecOps + ?Sized>(&self, rhs: &R) -> bool

Source§

fn is_less_or_equal<R: BitVecOps + ?Sized>(&self, rhs: &R) -> bool

Source§

fn is_greater_signed<R: BitVecOps + ?Sized>(&self, rhs: &R) -> bool

Source§

fn is_greater_or_equal_signed<R: BitVecOps + ?Sized>(&self, rhs: &R) -> bool

Source§

fn is_less_signed<R: BitVecOps + ?Sized>(&self, rhs: &R) -> bool

Source§

fn is_less_or_equal_signed<R: BitVecOps + ?Sized>(&self, rhs: &R) -> bool

Source§

fn slice(&self, msb: WidthInt, lsb: WidthInt) -> BitVecValue

Source§

fn is_bit_set(&self, pos: WidthInt) -> bool

Source§

fn sign_extend(&self, by: WidthInt) -> BitVecValue

Source§

fn zero_extend(&self, by: WidthInt) -> BitVecValue

Source§

fn not(&self) -> BitVecValue

Source§

fn negate(&self) -> BitVecValue

Source§

fn concat<R: BitVecOps + ?Sized>(&self, rhs: &R) -> BitVecValue

Source§

impl Debug for BitVecValueMutRef<'_>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> From<&'a mut BitVecValue> for BitVecValueMutRef<'a>

Source§

fn from(value: &'a mut BitVecValue) -> Self

Converts to this type from the input type.
Source§

impl<'a, I> IndexToMutRef<I, BitVecValueMutRef<'a>> for &'a mut [Word]

Source§

fn get_mut_ref(self, index: I) -> BitVecValueMutRef<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for BitVecValueMutRef<'a>

§

impl<'a> RefUnwindSafe for BitVecValueMutRef<'a>

§

impl<'a> Send for BitVecValueMutRef<'a>

§

impl<'a> Sync for BitVecValueMutRef<'a>

§

impl<'a> Unpin for BitVecValueMutRef<'a>

§

impl<'a> !UnwindSafe for BitVecValueMutRef<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.