pub struct InputValidationAnalyzer { /* private fields */ }Expand description
Input validation analyzer for detecting malicious inputs
Implementations§
Source§impl InputValidationAnalyzer
impl InputValidationAnalyzer
Sourcepub fn with_builtin_tests() -> Self
pub fn with_builtin_tests() -> Self
Create analyzer with built-in test cases
Sourcepub fn register_builtin_tests(&mut self)
pub fn register_builtin_tests(&mut self)
Register standard built-in validation tests
Sourcepub fn add_test(&mut self, test: InputValidationTest)
pub fn add_test(&mut self, test: InputValidationTest)
Add a custom validation test
Sourcepub fn clear_tests(&mut self)
pub fn clear_tests(&mut self)
Remove all test cases
Sourcepub fn test_count(&self) -> usize
pub fn test_count(&self) -> usize
Get the number of registered tests
Sourcepub fn run_all_tests(&mut self) -> Result<Vec<ValidationTestResult>>
pub fn run_all_tests(&mut self) -> Result<Vec<ValidationTestResult>>
Run all validation tests
Sourcepub fn run_test(
&mut self,
test_name: &str,
) -> Result<Option<ValidationTestResult>>
pub fn run_test( &mut self, test_name: &str, ) -> Result<Option<ValidationTestResult>>
Run specific validation test
Sourcepub fn get_statistics(&self) -> &VulnerabilityStatistics
pub fn get_statistics(&self) -> &VulnerabilityStatistics
Get vulnerability statistics
Sourcepub fn get_results(&self) -> &[ValidationTestResult]
pub fn get_results(&self) -> &[ValidationTestResult]
Get all test results
Sourcepub fn get_results_by_status(
&self,
status: TestStatus,
) -> Vec<&ValidationTestResult>
pub fn get_results_by_status( &self, status: TestStatus, ) -> Vec<&ValidationTestResult>
Get test results by status
Sourcepub fn get_results_by_severity(
&self,
severity: SeverityLevel,
) -> Vec<&ValidationTestResult>
pub fn get_results_by_severity( &self, severity: SeverityLevel, ) -> Vec<&ValidationTestResult>
Get test results by severity
Sourcepub fn clear_results(&mut self)
pub fn clear_results(&mut self)
Clear all results
Sourcepub fn get_test(&self, name: &str) -> Option<&InputValidationTest>
pub fn get_test(&self, name: &str) -> Option<&InputValidationTest>
Get test case by name
Sourcepub fn get_tests(&self) -> &[InputValidationTest]
pub fn get_tests(&self) -> &[InputValidationTest]
Get all test cases
Trait Implementations§
Source§impl Debug for InputValidationAnalyzer
impl Debug for InputValidationAnalyzer
Auto Trait Implementations§
impl Freeze for InputValidationAnalyzer
impl RefUnwindSafe for InputValidationAnalyzer
impl Send for InputValidationAnalyzer
impl Sync for InputValidationAnalyzer
impl Unpin for InputValidationAnalyzer
impl UnsafeUnpin for InputValidationAnalyzer
impl UnwindSafe for InputValidationAnalyzer
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.