pub fn register_for_range<S, C>(name: S, desc: S, command: C)where
    S: BnStrCompatible,
    C: RangeCommand,
Expand description

The function call required for generic commands; commands added in this way will be in the Plugins submenu of the menu bar.

Example

struct MyCommand;

impl AddressCommand for MyCommand {
    fn action(&self, view: &BinaryView, range: Range<u64>) {
        // Your code here
    }

    fn valid(&self, view: &BinaryView, range: Range<u64>) -> bool {
        // Your code here
        true
    }
}

#[no_mangle]
pub extern "C" fn CorePluginInit() -> bool {
    register_for_range(
        "My Plugin Command",
        "A description of my command",
        MyCommand {},
    );
    true
}