pub struct ScanResult {
pub file_path: PathBuf,
pub findings: Vec<Finding>,
pub scan_time_ms: u64,
pub file_size: u64,
pub skipped: bool,
pub skip_reason: Option<String>,
}Expand description
Result of scanning a single file
Fields§
§file_path: PathBufPath of the scanned file
findings: Vec<Finding>Findings from the scan
scan_time_ms: u64Time taken to scan this file (milliseconds)
file_size: u64Size of the file in bytes
skipped: boolWhether the file was skipped
skip_reason: Option<String>Reason for skipping (if applicable)
Implementations§
Source§impl ScanResult
impl ScanResult
Sourcepub fn skipped_with_reason(self, reason: String) -> Self
pub fn skipped_with_reason(self, reason: String) -> Self
Mark as skipped with reason
Sourcepub fn with_findings(self, findings: Vec<Finding>) -> Self
pub fn with_findings(self, findings: Vec<Finding>) -> Self
Add findings to the result
Sourcepub fn with_scan_time(self, time_ms: u64) -> Self
pub fn with_scan_time(self, time_ms: u64) -> Self
Set scan time
Sourcepub fn with_file_size(self, size: u64) -> Self
pub fn with_file_size(self, size: u64) -> Self
Set file size
Trait Implementations§
Source§impl Clone for ScanResult
impl Clone for ScanResult
Source§fn clone(&self) -> ScanResult
fn clone(&self) -> ScanResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ScanResult
impl RefUnwindSafe for ScanResult
impl Send for ScanResult
impl Sync for ScanResult
impl Unpin for ScanResult
impl UnsafeUnpin for ScanResult
impl UnwindSafe for ScanResult
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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