pub struct ScannerPipeline { /* private fields */ }Expand description
Scanner pipeline for composing multiple scanners
§Enterprise Pattern
Provides:
- Sequential execution
- Parallel execution option
- Short-circuit on high risk
- Result aggregation
Implementations§
Source§impl ScannerPipeline
impl ScannerPipeline
Sourcepub fn with_short_circuit(self, threshold: f32) -> Self
pub fn with_short_circuit(self, threshold: f32) -> Self
Enable short-circuit evaluation
If any scanner returns risk >= threshold, stop execution
Sourcepub async fn execute(
&self,
input: &str,
vault: &Vault,
) -> Result<Vec<ScanResult>>
pub async fn execute( &self, input: &str, vault: &Vault, ) -> Result<Vec<ScanResult>>
Execute pipeline sequentially
Sourcepub async fn execute_parallel(
&self,
input: &str,
vault: &Vault,
) -> Result<Vec<ScanResult>>
pub async fn execute_parallel( &self, input: &str, vault: &Vault, ) -> Result<Vec<ScanResult>>
Execute pipeline in parallel
All scanners run concurrently. Useful for I/O-bound scanners.
Sourcepub async fn execute_aggregated(
&self,
input: &str,
vault: &Vault,
) -> Result<ScanResult>
pub async fn execute_aggregated( &self, input: &str, vault: &Vault, ) -> Result<ScanResult>
Get aggregated result from pipeline
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ScannerPipeline
impl !RefUnwindSafe for ScannerPipeline
impl Send for ScannerPipeline
impl Sync for ScannerPipeline
impl Unpin for ScannerPipeline
impl !UnwindSafe for ScannerPipeline
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more