Trait armorlib::preprocessor::Preprocessor [] [src]

pub trait Preprocessor {
    fn process(&self, binary_object: &BinaryObject) -> HashMap<String, String>;
fn info(&self) -> (&'static str, &'static str); fn name(&self) -> &'static str { ... }
fn description(&self) -> &'static str { ... } }

A trait that defines the necessary functions of a Preprocessor. A Preprocessor is a modular component that has no dependencies on other preprocessors. It creates a HashMap of Strings mapped to other Strings that can then be accessed by the scan modules. For more information on how to contribute your own preprocessor, see docs/contributing/PREPROCESSORS.md.

Required Methods

Process the given BinaryObject and return a HashMap of Strings.

Returns a tuple of the name and description of the preprocessor. It is important that the first item of the tuple, the name, does not change once a preprocessor has been added to the master ArmorLib codebase, as the name is what scan modules rely on to ensure that the preprocessor's data is in scope. The name should be in snake case.

Provided Methods

Returns a &'static str of the name of the preprocessor. This is the name that the scan modules will rely on to ensure that the preprocessor's data is available, so it is important that this information does not change.

Returns a &'static str of the description of the preprocessor.

Implementors