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.

Implementors§