Struct DecomposingNormalizerBorrowed

struct DecomposingNormalizerBorrowed<'a> { ... }

Borrowed version of a normalizer for performing decomposing normalization.

Implementations

impl DecomposingNormalizerBorrowed<'static>

const fn static_to_owned(self: Self) -> DecomposingNormalizer

Cheaply converts a [DecomposingNormalizerBorrowed<'static>] into a DecomposingNormalizer.

Note: Due to branching and indirection, using DecomposingNormalizer might inhibit some compile-time optimizations that are possible with DecomposingNormalizerBorrowed.

const fn new_nfd() -> Self

NFD constructor using compiled data.

Enabled with the compiled_data Cargo feature.

📚 Help choosing a constructor

const fn new_nfkd() -> Self

NFKD constructor using compiled data.

Enabled with the compiled_data Cargo feature.

📚 Help choosing a constructor

impl<'data> DecomposingNormalizerBorrowed<'data>

fn normalize_iter<I: Iterator<Item = char>>(self: &Self, iter: I) -> Decomposition<'data, I>

Wraps a delegate iterator into a decomposing iterator adapter by using the data already held by this normalizer.

fn normalize<'a>(self: &Self, text: &'a str) -> Cow<'a, str>

Normalize a string slice into a Cow<'a, str>.

fn split_normalized<'a>(self: &Self, text: &'a str) -> (&'a str, &'a str)

Split a string slice into maximum normalized prefix and unnormalized suffix such that the concatenation of the prefix and the normalization of the suffix is the normalization of the whole input.

fn is_normalized(self: &Self, text: &str) -> bool

Check whether a string slice is normalized.

fn normalize_to<W: core::fmt::Write + ?Sized>(self: &Self, text: &str, sink: &mut W) -> Result

Normalize a string slice into a Write sink.

impl<'a> Debug for DecomposingNormalizerBorrowed<'a>

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result

impl<'a> Freeze for DecomposingNormalizerBorrowed<'a>

impl<'a> RefUnwindSafe for DecomposingNormalizerBorrowed<'a>

impl<'a> Send for DecomposingNormalizerBorrowed<'a>

impl<'a> Sync for DecomposingNormalizerBorrowed<'a>

impl<'a> Unpin for DecomposingNormalizerBorrowed<'a>

impl<'a> UnsafeUnpin for DecomposingNormalizerBorrowed<'a>

impl<'a> UnwindSafe for DecomposingNormalizerBorrowed<'a>

impl<T> Any for DecomposingNormalizerBorrowed<'a>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for DecomposingNormalizerBorrowed<'a>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for DecomposingNormalizerBorrowed<'a>

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> ErasedDestructor for DecomposingNormalizerBorrowed<'a>

impl<T> From for DecomposingNormalizerBorrowed<'a>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into for DecomposingNormalizerBorrowed<'a>

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for DecomposingNormalizerBorrowed<'a>

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for DecomposingNormalizerBorrowed<'a>

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>