B64

Struct B64 

Source
pub struct B64 {
    pub len: u32,
    pub bits: u64,
}

Fields§

§len: u32§bits: u64

Trait Implementations§

Source§

impl Add for B64

Source§

type Output = B64

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
Source§

impl BV for B64

Source§

const BIT_ONE: Self

Source§

const BIT_ZERO: Self

Source§

const MAX_WIDTH: u32 = 64u32

In Isla concrete bitvectors are only represented up to a specific maximum width/length. Beyond this they will be promoted to symbolic variables which are equal to a concrete value represented in the SMT solver. This makes computation over concrete bitvectors below this max width very efficient, as they can be represented as simple Copy types like u64.
Source§

fn new(bits: u64, len: u32) -> Self

Source§

fn lower_u64(self) -> u64

Source§

fn lower_u8(self) -> u8

Source§

fn is_zero(self) -> bool

Source§

fn zeros(len: u32) -> Self

Make a small bitvector of all zeros. Read more
Source§

fn ones(len: u32) -> Self

Make a small bitvector of all ones. Read more
Source§

fn leading_zeros(self) -> u32

Source§

fn from_u8(value: u8) -> Self

Source§

fn from_u16(value: u16) -> Self

Source§

fn from_u32(value: u32) -> Self

Source§

fn from_u64(value: u64) -> Self

Source§

fn from_bytes(bytes: &[u8]) -> Self

Byte order is: from_bytes(&[0xAB, 0xCD, 0xEF] == 0xABCDEF Read more
Source§

fn to_le_bytes(self) -> Vec<u8>

Source§

fn to_be_bytes(self) -> Vec<u8>

Source§

fn from_str(bv: &str) -> Option<Self>

Parses a bitvector from a string slice. String must be prefixed by either #x/0x, or #b/0b (allowing both SMT style and Sail/C style prefixes) for hexadecimal or binary. Returns None if the string is not parseable for any reason
Source§

fn len(self) -> u32

Source§

fn add_i128(self, op: i128) -> Self

Source§

fn zero_extend(self, new_len: u32) -> Self

zero_extend a bitvector to a specific new length. Read more
Source§

fn sign_extend(self, new_len: u32) -> Self

sign_extend a bitvector to a specific new length. Sign extending a zero-length bitvector creates a new_len sized bitvector containing only zeros. Read more
Source§

fn unsigned(self) -> i128

Source§

fn signed(self) -> i128

Source§

fn slice(self, from: u32, len: u32) -> Option<Self>

Source§

fn set_slice(self, n: u32, update: Self) -> Self

Source§

fn set_slice_int(int: i128, n: u32, update: Self) -> i128

Source§

fn get_slice_int(len: u32, int: i128, n: u32) -> Self

Source§

fn len_i128(self) -> i128

Source§

fn is_empty(self) -> bool

Source§

fn sub_i128(self, op: i128) -> Self

Source§

fn append(self, suffix: Self) -> Option<Self>

Source§

fn extract(self, high: u32, low: u32) -> Option<Self>

Source§

fn shiftr(self, shift: i128) -> Self

Source§

fn arith_shiftr(self, shift: i128) -> Self

Source§

fn shiftl(self, shift: i128) -> Self

Source§

fn truncate_lsb(self, len: i128) -> Option<Self>

Source§

fn replicate(self, times: i128) -> Option<Self>

Source§

impl BitAnd for B64

Source§

type Output = B64

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: Self) -> Self::Output

Performs the & operation. Read more
Source§

impl BitOr for B64

Source§

type Output = B64

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: Self) -> Self::Output

Performs the | operation. Read more
Source§

impl BitXor for B64

Source§

type Output = B64

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: Self) -> Self::Output

Performs the ^ operation. Read more
Source§

impl Clone for B64

Source§

fn clone(&self) -> B64

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for B64

Source§

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

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

impl<'de> Deserialize<'de> for B64

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for B64

Source§

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

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

impl Hash for B64

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl LowerHex for B64

Source§

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

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

impl Neg for B64

Source§

type Output = B64

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl Not for B64

Source§

type Output = B64

The resulting type after applying the ! operator.
Source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
Source§

impl PartialEq for B64

Source§

fn eq(&self, other: &B64) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for B64

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Shl for B64

Source§

type Output = B64

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: Self) -> Self::Output

Performs the << operation. Read more
Source§

impl Shr for B64

Source§

type Output = B64

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: Self) -> Self::Output

Performs the >> operation. Read more
Source§

impl Sub for B64

Source§

type Output = B64

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
Source§

impl TryInto<u64> for B64

Source§

type Error = ExecError

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

fn try_into(self) -> Result<u64, ExecError>

Performs the conversion.
Source§

impl UpperHex for B64

Source§

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

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

impl Copy for B64

Source§

impl Eq for B64

Source§

impl StructuralPartialEq for B64

Auto Trait Implementations§

§

impl Freeze for B64

§

impl RefUnwindSafe for B64

§

impl Send for B64

§

impl Sync for B64

§

impl Unpin for B64

§

impl UnwindSafe for B64

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
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.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,