pub struct SanitizationConfig {
pub remove_nan: bool,
pub remove_infinity: bool,
pub clamp_values: bool,
pub valid_range: Option<(f64, f64)>,
pub max_array_size: Option<usize>,
pub max_string_length: Option<usize>,
pub forbidden_chars: Vec<char>,
pub deep_validation: bool,
}Expand description
Configuration for input sanitization
Fields§
§remove_nan: boolWhether to remove NaN values
remove_infinity: boolWhether to remove infinite values
clamp_values: boolWhether to clamp values to valid ranges
valid_range: Option<(f64, f64)>Valid range for numeric values
max_array_size: Option<usize>Maximum allowed array size
max_string_length: Option<usize>Maximum string length
forbidden_chars: Vec<char>Characters that are not allowed in strings
deep_validation: boolWhether to perform deep validation
Trait Implementations§
Source§impl Clone for SanitizationConfig
impl Clone for SanitizationConfig
Source§fn clone(&self) -> SanitizationConfig
fn clone(&self) -> SanitizationConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SanitizationConfig
impl Debug for SanitizationConfig
Auto Trait Implementations§
impl Freeze for SanitizationConfig
impl RefUnwindSafe for SanitizationConfig
impl Send for SanitizationConfig
impl Sync for SanitizationConfig
impl Unpin for SanitizationConfig
impl UnwindSafe for SanitizationConfig
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,
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