use std::borrow::Cow;
#[cfg(doc)]
use crate::Xot;
#[cfg(feature = "icu")]
#[cfg(doc)]
use icu;
#[cfg_attr(
feature = "icu",
doc = r##"
If you enable the `icu` feature, you can use the `icu` normalizers [`icu::normalizer::ComposingNormalizer`] and
[`icu::normalizer::DecomposingNormalizer`] as normalizers."##
)]
pub trait Normalizer {
fn normalize<'a>(&self, content: Cow<'a, str>) -> Cow<'a, str>;
}
pub struct NoopNormalizer;
impl Normalizer for NoopNormalizer {
#[inline]
fn normalize<'a>(&self, content: Cow<'a, str>) -> Cow<'a, str> {
content
}
}