pub struct CanonicalCombiningClassMap {
decompositions: DataPayload<CanonicalDecompositionDataV1Marker>,
}
Expand description
Lookup of the Canonical_Combining_Class Unicode property.
§Example
use icu::properties::CanonicalCombiningClass;
use icu::normalizer::properties::CanonicalCombiningClassMap;
let map = CanonicalCombiningClassMap::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
Fields§
§decompositions: DataPayload<CanonicalDecompositionDataV1Marker>
The data trie
Implementations§
source§impl CanonicalCombiningClassMap
impl CanonicalCombiningClassMap
sourcepub fn get(&self, c: char) -> CanonicalCombiningClass
pub fn get(&self, c: char) -> CanonicalCombiningClass
Look up the canonical combining class for a scalar value
sourcepub fn get32(&self, c: u32) -> CanonicalCombiningClass
pub fn get32(&self, c: u32) -> CanonicalCombiningClass
Look up the canonical combining class for a scalar value
represented as u32
. If the argument is outside the scalar
value range, CanonicalCombiningClass::NotReordered
is returned.
sourcepub const fn new() -> Self
pub const fn new() -> Self
Construct from compiled data.
✨ Enabled with the compiled_data
Cargo feature.
sourcepub fn try_new_with_any_provider(
provider: &(impl AnyProvider + ?Sized),
) -> Result<Self, NormalizerError>
pub fn try_new_with_any_provider( provider: &(impl AnyProvider + ?Sized), ) -> Result<Self, NormalizerError>
A version of [Self :: new
] that uses custom data provided by an AnyProvider
.
sourcepub fn try_new_unstable<D>(provider: &D) -> Result<Self, NormalizerError>
pub fn try_new_unstable<D>(provider: &D) -> Result<Self, NormalizerError>
A version of Self::new
that uses custom data provided by a DataProvider
.
⚠️ The bounds on provider may change over time, including in SemVer minor releases.
Trait Implementations§
source§impl Debug for CanonicalCombiningClassMap
impl Debug for CanonicalCombiningClassMap
Auto Trait Implementations§
impl Freeze for CanonicalCombiningClassMap
impl RefUnwindSafe for CanonicalCombiningClassMap
impl !Send for CanonicalCombiningClassMap
impl !Sync for CanonicalCombiningClassMap
impl Unpin for CanonicalCombiningClassMap
impl UnwindSafe for CanonicalCombiningClassMap
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more