#[non_exhaustive]pub struct Mismatch {
pub module: &'static str,
pub rva: u32,
pub expected: &'static [u8],
pub found: Vec<u8>,
pub scan: Option<Error>,
pub vtable: Option<VtableMiss>,
}Expand description
Why a function wasn’t where the bindings expect, and why nothing else found
it: the details of Error::VerificationFailed.
Boxed, so the error stays small as ways to find a function are added.
§Examples
use imping_runtime::{Error, VtableMiss};
if let Error::VerificationFailed(mismatch) = &error {
if let Some(VtableMiss::ClassNotFound { type_name }) = &mismatch.vtable {
eprintln!("{type_name} is gone from this build");
}
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.module: &'static strThe module’s file name.
rva: u32The function’s address relative to the module’s base.
expected: &'static [u8]The bytes the bindings expect.
found: Vec<u8>The bytes found, empty if they’d be past the end of the module.
scan: Option<Error>Why the function’s byte pattern didn’t find it, if it has one and that’s why.
vtable: Option<VtableMiss>Why its class’s vtable didn’t lead to it, if it’s in one.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Mismatch
impl RefUnwindSafe for Mismatch
impl Send for Mismatch
impl Sync for Mismatch
impl Unpin for Mismatch
impl UnsafeUnpin for Mismatch
impl UnwindSafe for Mismatch
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