pub struct Scanner { /* private fields */ }Implementations§
Source§impl Scanner
impl Scanner
pub fn new() -> Result<Self, ScannerError>
pub fn with_patterns( patterns: Vec<(String, Regex)>, ) -> Result<Self, ScannerError>
Sourcepub fn with_context_filter(
context_filter: ContextFilter,
) -> Result<Self, ScannerError>
pub fn with_context_filter( context_filter: ContextFilter, ) -> Result<Self, ScannerError>
Create scanner with custom context filter
Sourcepub fn set_context_filter(&mut self, context_filter: ContextFilter)
pub fn set_context_filter(&mut self, context_filter: ContextFilter)
Set context filter for this scanner
Sourcepub fn context_filter(&self) -> &ContextFilter
pub fn context_filter(&self) -> &ContextFilter
Get a reference to the context filter
pub fn scan_directory(&self, path: &Path) -> Result<Vec<Finding>, ScannerError>
Sourcepub fn scan_directory_optimized(
&self,
path: &Path,
) -> Result<Vec<Finding>, ScannerError>
pub fn scan_directory_optimized( &self, path: &Path, ) -> Result<Vec<Finding>, ScannerError>
Optimized parallel scanning with rayon
Sourcepub fn scan_directory_rayon(
&self,
path: &Path,
) -> Result<Vec<Finding>, ScannerError>
pub fn scan_directory_rayon( &self, path: &Path, ) -> Result<Vec<Finding>, ScannerError>
Legacy parallel scanning method (for comparison)
Sourcepub fn estimate_memory_usage(
num_files: usize,
avg_file_size: usize,
) -> (f64, String)
pub fn estimate_memory_usage( num_files: usize, avg_file_size: usize, ) -> (f64, String)
Get estimated memory usage for scanning a given number of files
Sourcepub fn get_memory_stats() -> Option<(f64, f64)>
pub fn get_memory_stats() -> Option<(f64, f64)>
Monitor actual memory usage during scanning (requires external memory monitoring)
Auto Trait Implementations§
impl Freeze for Scanner
impl RefUnwindSafe for Scanner
impl Send for Scanner
impl Sync for Scanner
impl Unpin for Scanner
impl UnwindSafe for Scanner
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more