Struct CanonicalCombiningClassMapBorrowed

struct CanonicalCombiningClassMapBorrowed<'a> { ... }

Borrowed version of lookup of the Canonical_Combining_Class Unicode property.

Example

use icu::properties::props::CanonicalCombiningClass;
use icu::normalizer::properties::CanonicalCombiningClassMapBorrowed;

let map = CanonicalCombiningClassMapBorrowed::new();
assert_eq!(map.get('a'), CanonicalCombiningClass::NotReordered); // U+0061: LATIN SMALL LETTER A
assert_eq!(map.get32(0x0301), CanonicalCombiningClass::Above); // U+0301: COMBINING ACUTE ACCENT

Implementations

impl CanonicalCombiningClassMapBorrowed<'_>

fn get_u8(self: &Self, c: char) -> u8

Look up the canonical combining class for a scalar value.

The return value is a u8 representing the canonical combining class, you may enable the "icu_properties" feature if you would like to use a typed CanonicalCombiningClass.

fn get32_u8(self: &Self, c: u32) -> u8

Look up the canonical combining class for a scalar value represented as u32. If the argument is outside the scalar value range, Not_Reordered is returned.

The return value is a u8 representing the canonical combining class, you may enable the "icu_properties" feature if you would like to use a typed CanonicalCombiningClass.

impl CanonicalCombiningClassMapBorrowed<'static>

const fn static_to_owned(self: Self) -> CanonicalCombiningClassMap

Cheaply converts a [CanonicalCombiningClassMapBorrowed<'static>] into a CanonicalCombiningClassMap.

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

const fn new() -> Self

Construct from compiled data.

Enabled with the compiled_data Cargo feature.

📚 Help choosing a constructor

impl Default for CanonicalCombiningClassMapBorrowed<'static>

fn default() -> Self

impl<'a> Debug for CanonicalCombiningClassMapBorrowed<'a>

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

impl<'a> Freeze for CanonicalCombiningClassMapBorrowed<'a>

impl<'a> RefUnwindSafe for CanonicalCombiningClassMapBorrowed<'a>

impl<'a> Send for CanonicalCombiningClassMapBorrowed<'a>

impl<'a> Sync for CanonicalCombiningClassMapBorrowed<'a>

impl<'a> Unpin for CanonicalCombiningClassMapBorrowed<'a>

impl<'a> UnsafeUnpin for CanonicalCombiningClassMapBorrowed<'a>

impl<'a> UnwindSafe for CanonicalCombiningClassMapBorrowed<'a>

impl<T> Any for CanonicalCombiningClassMapBorrowed<'a>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for CanonicalCombiningClassMapBorrowed<'a>

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

impl<T> BorrowMut for CanonicalCombiningClassMapBorrowed<'a>

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

impl<T> ErasedDestructor for CanonicalCombiningClassMapBorrowed<'a>

impl<T> From for CanonicalCombiningClassMapBorrowed<'a>

fn from(t: T) -> T

Returns the argument unchanged.

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

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

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

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