pub struct NeutralizationValidator { /* private fields */ }Expand description
Input validator for neutralization
Implementations§
Source§impl NeutralizationValidator
impl NeutralizationValidator
pub const fn new(config: ValidationConfig) -> Self
Sourcepub fn validate_input(&self, threat: &Threat, content: &str) -> Result<()>
pub fn validate_input(&self, threat: &Threat, content: &str) -> Result<()>
Validate input before neutralization
Sourcepub fn validate_output(
&self,
threat: &Threat,
original: &str,
result: &NeutralizeResult,
) -> Result<()>
pub fn validate_output( &self, threat: &Threat, original: &str, result: &NeutralizeResult, ) -> Result<()>
Validate output after neutralization
Auto Trait Implementations§
impl Freeze for NeutralizationValidator
impl RefUnwindSafe for NeutralizationValidator
impl Send for NeutralizationValidator
impl Sync for NeutralizationValidator
impl Unpin for NeutralizationValidator
impl UnsafeUnpin for NeutralizationValidator
impl UnwindSafe for NeutralizationValidator
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
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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