Trait armorlib::process::Process
[−]
[src]
pub trait Process { fn process(self) -> Result<ScanResult, ArmorlibError>
where
Self: Sized,
BinaryObject: From<Self>, { ... } }
A trait that allows for the object to be run through the ArmorLib system with only a single
call to .process()
. This is a perfectly valid way of passing objects through ArmorLib,
however coordinator::Process
is also available for more granular control.
Examples
use armorlib::Process; let data: Vec<u8> = vec![]; // empty data for demo let scan_result = data.process().unwrap();
Provided Methods
fn process(self) -> Result<ScanResult, ArmorlibError> where
Self: Sized,
BinaryObject: From<Self>,
Self: Sized,
BinaryObject: From<Self>,
Implementations on Foreign Types
impl Process for Vec<u8>
[src]
An empty implementation of Process for Vec<u8>
. Because BinaryObject: From<Vec<u8>>
is
implemented in the binary_object
module, no special implementation is necessary here.
Provided that binary_object
is in scope, you can just call vec.process()
.
Examples
use armorlib::binary_object::BinaryObject; use armorlib::process::Process; let vec: Vec<u8> = vec![1, 2, 3, 4, 5]; let _scan_result = vec.process().unwrap(); // this is a `ScanResult` object
fn process(self) -> Result<ScanResult, ArmorlibError> where
Self: Sized,
BinaryObject: From<Self>,
[src]
Self: Sized,
BinaryObject: From<Self>,
impl Process for File
[src]
fn process(self) -> Result<ScanResult, ArmorlibError> where
Self: Sized,
BinaryObject: From<Self>,
[src]
Self: Sized,
BinaryObject: From<Self>,
Implementors
impl Process for BinaryObject