pub trait BitVecOps {
Show 34 methods
// Required methods
fn width(&self) -> WidthInt;
fn words(&self) -> &[Word];
// Provided methods
fn to_bit_str(&self) -> String { ... }
fn to_bytes_le(&self) -> Vec<u8> { ... }
fn to_bool(&self) -> Option<bool> { ... }
fn to_u64(&self) -> Option<u64> { ... }
fn to_i64(&self) -> Option<i64> { ... }
fn is_zero(&self) -> bool { ... }
fn is_negative(&self) -> bool { ... }
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 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 { ... }
}Expand description
Operations over immutable bit-vector values.
Required Methods§
Provided Methods§
sourcefn to_bit_str(&self) -> String
fn to_bit_str(&self) -> String
Convert to a string of 1s and 0s.
fn to_bytes_le(&self) -> Vec<u8>
sourcefn 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
sourcefn 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_zero(&self) -> bool
fn is_negative(&self) -> bool
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 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
Object Safety§
This trait is not object safe.