Macro t2plugin::t2plugin

source ·
macro_rules! t2plugin {
    ($TYPE:ident) => { ... };
}
Expand description

This macro transforms a struct implementing the T2Plugin trait into a plugin which can be loaded by Tranalyzer2.

This macro creates the necessary C interface so the plugin can be loaded by Tranalyzer2. It redirects these C functions to their corresponding Rust methods defined when implementing the T2Plugin trait.

Example

struct ExamplePlugin {
    ...
}

impl T2Plugin for ExamplePlugin {
    ...
}

// creates the necessary C interface so ExamplePlugin can be loaded in Tranalyzer2
t2plugin!(ExamplePlugin);