Normalizer

Trait Normalizer 

Source
pub trait Normalizer: Validator {
    // Required method
    fn normalize(raw: &str) -> Result<Cow<'_, str>, Self::Error>;
}
Expand description

A normalizer that can verify a given input is valid and performs necessary normalization

Required Methods§

Source

fn normalize(raw: &str) -> Result<Cow<'_, str>, Self::Error>

Validates and normalizes the borrowed input

§Errors

Returns an error if the string is invalid and cannot be normalized.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§