pub trait SanitizeValue<Trusted> {
type Error;
// Required method
fn sanitize_value(self) -> Result<Trusted, Self::Error>;
}Expand description
The type implementing this struct can be sanitized.
Calling sanitize_value() on the implementing type should return a sanitized version of the value.
If the value cannot be sanitized, an error should be returned.
The sanitize_value function SHOULD clear all taint from the input.
Required Associated Types§
Required Methods§
Sourcefn sanitize_value(self) -> Result<Trusted, Self::Error>
fn sanitize_value(self) -> Result<Trusted, Self::Error>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
Source§impl<E, Insecure: SanitizeValue<Insecure, Error = E>> SanitizeValue<Insecure> for MaybeUntrusted<Insecure>
impl<E, Insecure: SanitizeValue<Insecure, Error = E>> SanitizeValue<Insecure> for MaybeUntrusted<Insecure>
Source§impl<Sanitized, E, Insecure: SanitizeValue<Sanitized, Error = E>> SanitizeValue<Sanitized> for UntrustedValue<Insecure>
If the tainted data type can be sanitized using the SanitizeValue trait, implement also
the SanitizeValue trait for this UntrustedValue type.
impl<Sanitized, E, Insecure: SanitizeValue<Sanitized, Error = E>> SanitizeValue<Sanitized> for UntrustedValue<Insecure>
If the tainted data type can be sanitized using the SanitizeValue trait, implement also
the SanitizeValue trait for this UntrustedValue type.