Struct yaxpeax_arch::AddressDiff [−][src]
pub struct AddressDiff<T: AddressBase> { /* fields omitted */ }
Expand description
a struct describing the differece between some pair of A: Address
. this is primarily useful
in describing the size of an instruction, or the relative offset of a branch.
for any address type A
, the following must hold:
use yaxpeax_arch::AddressBase; fn diff_check<A: AddressBase + core::fmt::Debug>(left: A, right: A) { let diff = left.diff(&right); if let Some(offset) = diff { assert_eq!(left.wrapping_offset(offset), right); } }
which is to say, yaxpeax
assumes associativity holds when diff
yields a Some
.
Implementations
Trait Implementations
Performs the +=
operation. Read more
Performs the +=
operation. Read more
Performs the +=
operation. Read more
Performs the +=
operation. Read more
impl<'de, T: AddressBase> Deserialize<'de> for AddressDiff<T> where
T::Diff: AddressDiffAmount,
impl<'de, T: AddressBase> Deserialize<'de> for AddressDiff<T> where
T::Diff: AddressDiffAmount,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<T: PartialEq + AddressBase> PartialEq<AddressDiff<T>> for AddressDiff<T> where
T::Diff: PartialEq,
impl<T: PartialEq + AddressBase> PartialEq<AddressDiff<T>> for AddressDiff<T> where
T::Diff: PartialEq,
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
impl<T: PartialOrd + AddressBase> PartialOrd<AddressDiff<T>> for AddressDiff<T> where
T::Diff: PartialOrd,
impl<T: PartialOrd + AddressBase> PartialOrd<AddressDiff<T>> for AddressDiff<T> where
T::Diff: PartialOrd,
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Performs the -=
operation. Read more
Performs the -=
operation. Read more
Performs the -=
operation. Read more
Performs the -=
operation. Read more
Auto Trait Implementations
impl<T> RefUnwindSafe for AddressDiff<T> where
<T as AddressBase>::Diff: RefUnwindSafe,
impl<T> Send for AddressDiff<T> where
<T as AddressBase>::Diff: Send,
impl<T> Sync for AddressDiff<T> where
<T as AddressBase>::Diff: Sync,
impl<T> Unpin for AddressDiff<T> where
<T as AddressBase>::Diff: Unpin,
impl<T> UnwindSafe for AddressDiff<T> where
<T as AddressBase>::Diff: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more