ProcStartLinuxCallbacks

Trait ProcStartLinuxCallbacks 

Source
pub trait ProcStartLinuxCallbacks {
    // Required method
    fn on_rec_auxv<CallbackFn>(self, callback: CallbackFn)
       where CallbackFn: FnMut(&mut CPUState, &mut TranslationBlock, &AuxvValues) + 'static;
}
Expand description

A trait for expressing the plugin-to-plugin callbacks provided by the given plugin. See panda::PppCallback for more information, as this is intended to be used as an extension trait for it.

Required Methods§

Source

fn on_rec_auxv<CallbackFn>(self, callback: CallbackFn)
where CallbackFn: FnMut(&mut CPUState, &mut TranslationBlock, &AuxvValues) + 'static,

Installs the given closure over the callback slot provided by the panda::PppCallback this is called on, setting it to be run whenever the on_rec_auxv callback is hit.

§Arguments
  • cpu - &mut CPUState

  • tb - &mut TranslationBlock

  • auxv - &AuxvValues

§Example
use panda::PppCallback;
use panda::prelude::*;
use /*...*/::ProcStartLinuxCallbacks;

PppCallbacks::new()
   .on_rec_auxv(|cpu: &mut CPUState, tb: &mut TranslationBlock, auxv: &AuxvValues, |{
       // callback code
   });

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§