Skip to main content

Sanitizer

Trait Sanitizer 

Source
pub trait Sanitizer {
    // Required method
    fn sanitize(&self, allowed_patterns: &HashSet<Cow<'static, str>>) -> String;
}
Expand description

A trait that extends a type with sanitization capabilities

Required Methods§

Source

fn sanitize(&self, allowed_patterns: &HashSet<Cow<'static, str>>) -> String

Sanitizes a type by removing or masking sensitive information based on a set of allowed patterns

§Arguments
  • patterns - A slice of string slices containing patterns which are allowed in the Url.
§Returns

A String containing the sanitized URL

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§