/// This type can be sanitized using a provided sanitizer. /// /// This trait will be implemented automatically for structs /// generated by the `#[derive(UntrustedVariant)]` macro. /// /// The `sanitize_with` function SHOULD clear all taint from the input. pub trait SanitizeWith { /// Sanitizes the value using the provided sanitizer. /// /// # Errors /// If sanitization fails, an error must be returned. fn sanitize_with(self, sanitizer: Sanitizer) -> Result where Sanitizer: FnOnce(Insecure) -> Result; }