Struct ComposingNormalizerBorrowed

struct ComposingNormalizerBorrowed<'a> { ... }

Borrowed version of a normalizer for performing composing normalization.

Implementations

impl ComposingNormalizerBorrowed<'static>

const fn static_to_owned(self: Self) -> ComposingNormalizer

Cheaply converts a [ComposingNormalizerBorrowed<'static>] into a ComposingNormalizer.

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

const fn new_nfc() -> Self

NFC constructor using compiled data.

Enabled with the compiled_data Cargo feature.

📚 Help choosing a constructor

const fn new_nfkc() -> Self

NFKC constructor using compiled data.

Enabled with the compiled_data Cargo feature.

📚 Help choosing a constructor

impl<'data> ComposingNormalizerBorrowed<'data>

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

Wraps a delegate iterator into a composing 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 ComposingNormalizerBorrowed<'a>

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

impl<'a> Freeze for ComposingNormalizerBorrowed<'a>

impl<'a> RefUnwindSafe for ComposingNormalizerBorrowed<'a>

impl<'a> Send for ComposingNormalizerBorrowed<'a>

impl<'a> Sync for ComposingNormalizerBorrowed<'a>

impl<'a> Unpin for ComposingNormalizerBorrowed<'a>

impl<'a> UnsafeUnpin for ComposingNormalizerBorrowed<'a>

impl<'a> UnwindSafe for ComposingNormalizerBorrowed<'a>

impl<T> Any for ComposingNormalizerBorrowed<'a>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for ComposingNormalizerBorrowed<'a>

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

impl<T> BorrowMut for ComposingNormalizerBorrowed<'a>

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

impl<T> ErasedDestructor for ComposingNormalizerBorrowed<'a>

impl<T> From for ComposingNormalizerBorrowed<'a>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into for ComposingNormalizerBorrowed<'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 ComposingNormalizerBorrowed<'a>

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

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

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