pub struct BitVecValueRef<'a>(/* private fields */);Expand description
Bit-vector value that does not own its storage.
Implementations§
Trait Implementations§
Source§impl BitVecOps for BitVecValueRef<'_>
impl BitVecOps for BitVecValueRef<'_>
fn width(&self) -> WidthInt
fn words(&self) -> &[Word] ⓘ
Source§fn to_bit_str(&self) -> String
fn to_bit_str(&self) -> String
Convert to a string of 1s and 0s.
Source§fn to_bit_str_signed(&self) -> String
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
fn to_hex_str(&self) -> String
Convert to a string of hex characters
Source§fn to_dec_str(&self) -> String
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
fn to_hex_str_signed(&self) -> String
Convert to a string of hex characters with a
- if the value is negative.fn to_bytes_le(&self) -> Vec<u8> ⓘ
Source§fn to_u64(&self) -> Option<u64>
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>
fn to_i64(&self) -> Option<i64>
Returns the value as a 64-bit signed integer if the value can be represented
fn is_true(&self) -> bool
fn is_false(&self) -> bool
fn is_zero(&self) -> bool
fn is_one(&self) -> bool
fn is_all_ones(&self) -> bool
fn is_negative(&self) -> bool
fn is_pow_2(&self) -> Option<WidthInt>
Source§fn min_width(&self) -> WidthInt
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>>
fn bit_set_intervals(&self) -> Vec<Range<WidthInt>>
Computes all ranges for which the bits are one.
fn add<R: BitVecOps>(&self, rhs: &R) -> BitVecValue
fn sub<R: BitVecOps>(&self, rhs: &R) -> BitVecValue
fn shift_left<R: BitVecOps>(&self, rhs: &R) -> BitVecValue
fn shift_right<R: BitVecOps>(&self, rhs: &R) -> BitVecValue
fn arithmetic_shift_right<R: BitVecOps>(&self, rhs: &R) -> BitVecValue
fn mul<R: BitVecOps>(&self, rhs: &R) -> BitVecValue
fn and<R: BitVecOps>(&self, rhs: &R) -> BitVecValue
fn or<R: BitVecOps>(&self, rhs: &R) -> BitVecValue
fn xor<R: BitVecOps>(&self, rhs: &R) -> BitVecValue
fn is_equal<R: BitVecOps + ?Sized>(&self, rhs: &R) -> bool
fn is_not_equal<R: BitVecOps + ?Sized>(&self, rhs: &R) -> bool
fn is_greater<R: BitVecOps + ?Sized>(&self, rhs: &R) -> bool
fn is_greater_or_equal<R: BitVecOps + ?Sized>(&self, rhs: &R) -> bool
fn is_less<R: BitVecOps + ?Sized>(&self, rhs: &R) -> bool
fn is_less_or_equal<R: BitVecOps + ?Sized>(&self, rhs: &R) -> bool
fn is_greater_signed<R: BitVecOps + ?Sized>(&self, rhs: &R) -> bool
fn is_greater_or_equal_signed<R: BitVecOps + ?Sized>(&self, rhs: &R) -> bool
fn is_less_signed<R: BitVecOps + ?Sized>(&self, rhs: &R) -> bool
fn is_less_or_equal_signed<R: BitVecOps + ?Sized>(&self, rhs: &R) -> bool
fn slice(&self, msb: WidthInt, lsb: WidthInt) -> BitVecValue
fn is_bit_set(&self, pos: WidthInt) -> bool
fn sign_extend(&self, by: WidthInt) -> BitVecValue
fn zero_extend(&self, by: WidthInt) -> BitVecValue
fn not(&self) -> BitVecValue
fn negate(&self) -> BitVecValue
fn concat<R: BitVecOps + ?Sized>(&self, rhs: &R) -> BitVecValue
Source§impl<'a> Borrow<BitVecValueRef<'a>> for BitVecValue
impl<'a> Borrow<BitVecValueRef<'a>> for BitVecValue
Source§fn borrow(&self) -> &BitVecValueRef<'a>
fn borrow(&self) -> &BitVecValueRef<'a>
Immutably borrows from an owned value. Read more
Source§impl<'a> Clone for BitVecValueRef<'a>
impl<'a> Clone for BitVecValueRef<'a>
Source§fn clone(&self) -> BitVecValueRef<'a>
fn clone(&self) -> BitVecValueRef<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BitVecValueRef<'_>
impl Debug for BitVecValueRef<'_>
Source§impl<'a> From<&'a BitVecValue> for BitVecValueRef<'a>
impl<'a> From<&'a BitVecValue> for BitVecValueRef<'a>
Source§fn from(value: &'a BitVecValue) -> Self
fn from(value: &'a BitVecValue) -> Self
Converts to this type from the input type.
Source§impl<'a> From<BitVecValueRef<'a>> for BitVecValue
impl<'a> From<BitVecValueRef<'a>> for BitVecValue
Source§fn from(value: BitVecValueRef<'a>) -> Self
fn from(value: BitVecValueRef<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> Hash for BitVecValueRef<'a>
impl<'a> Hash for BitVecValueRef<'a>
Source§impl<'a, I> IndexToRef<I, BitVecValueRef<'a>> for &'a [Word]where
I: Borrow<BitVecValueIndex>,
impl<'a, I> IndexToRef<I, BitVecValueRef<'a>> for &'a [Word]where
I: Borrow<BitVecValueIndex>,
fn get_ref(self, index: I) -> BitVecValueRef<'a>
Source§impl<O: BitVecOps> PartialEq<O> for BitVecValueRef<'_>
impl<O: BitVecOps> PartialEq<O> for BitVecValueRef<'_>
impl<'a> Copy for BitVecValueRef<'a>
impl Eq for BitVecValueRef<'_>
Auto Trait Implementations§
impl<'a> Freeze for BitVecValueRef<'a>
impl<'a> RefUnwindSafe for BitVecValueRef<'a>
impl<'a> Send for BitVecValueRef<'a>
impl<'a> Sync for BitVecValueRef<'a>
impl<'a> Unpin for BitVecValueRef<'a>
impl<'a> UnwindSafe for BitVecValueRef<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more