pub struct CanonicalCombiningClassMap { /* private fields */ }
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
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