Struct icu::normalizer::properties::CanonicalCombiningClassMap
source · [−]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::try_new_unstable(&icu_testdata::unstable()).unwrap();
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
sourceimpl 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 fn try_new_unstable<D>(
data_provider: &D
) -> Result<CanonicalCombiningClassMap, NormalizerError> where
D: DataProvider<CanonicalDecompositionDataV1Marker> + ?Sized,
pub fn try_new_unstable<D>(
data_provider: &D
) -> Result<CanonicalCombiningClassMap, NormalizerError> where
D: DataProvider<CanonicalDecompositionDataV1Marker> + ?Sized,
Construct from data provider.
⚠️ The bounds on this function may change over time, including in SemVer minor releases.
sourcepub fn try_new_with_any_provider(
provider: &impl AnyProvider
) -> Result<CanonicalCombiningClassMap, NormalizerError>
pub fn try_new_with_any_provider(
provider: &impl AnyProvider
) -> Result<CanonicalCombiningClassMap, NormalizerError>
Creates a new instance using an AnyProvider
.
For details on the behavior of this function, see: Self::try_new_unstable
sourcepub fn try_new_with_buffer_provider(
provider: &impl BufferProvider
) -> Result<CanonicalCombiningClassMap, NormalizerError>
pub fn try_new_with_buffer_provider(
provider: &impl BufferProvider
) -> Result<CanonicalCombiningClassMap, NormalizerError>
✨ Enabled with the "serde"
feature.
Creates a new instance using a BufferProvider
.
For details on the behavior of this function, see: Self::try_new_unstable
Auto Trait Implementations
impl RefUnwindSafe for CanonicalCombiningClassMap
impl Send for CanonicalCombiningClassMap
impl Sync for CanonicalCombiningClassMap
impl Unpin for CanonicalCombiningClassMap
impl UnwindSafe for CanonicalCombiningClassMap
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more