Struct icu_properties::props::JoiningType
source · #[repr(transparent)]pub struct JoiningType(pub u8);
Expand description
Enumerated property Joining_Type. See Section 9.2, Arabic Cursive Joining in The Unicode Standard for the summary of each property value.
The numeric value is compatible with UJoiningType
in ICU4C.
Tuple Fields§
§0: u8
Implementations§
source§impl JoiningType
impl JoiningType
pub const NonJoining: JoiningType = _
pub const JoinCausing: JoiningType = _
pub const DualJoining: JoiningType = _
pub const LeftJoining: JoiningType = _
pub const RightJoining: JoiningType = _
pub const Transparent: JoiningType = _
source§impl JoiningType
impl JoiningType
sourcepub const fn name_to_enum_mapper() -> PropertyValueNameToEnumMapperBorrowed<'static, JoiningType>
pub const fn name_to_enum_mapper() -> PropertyValueNameToEnumMapperBorrowed<'static, JoiningType>
Return a PropertyValueNameToEnumMapper
, capable of looking up values
from strings for the Joining_Type
enumerated property.
✨ Enabled with the compiled_data
Cargo feature.
§Example
use icu::properties::JoiningType;
let lookup = JoiningType::name_to_enum_mapper();
// short name for value
assert_eq!(lookup.get_strict("T"), Some(JoiningType::Transparent));
assert_eq!(lookup.get_strict("D"), Some(JoiningType::DualJoining));
// long name for value
assert_eq!(lookup.get_strict("Join_Causing"), Some(JoiningType::JoinCausing));
assert_eq!(lookup.get_strict("Non_Joining"), Some(JoiningType::NonJoining));
// name has incorrect casing
assert_eq!(lookup.get_strict("LEFT_JOINING"), None);
// loose matching of name
assert_eq!(lookup.get_loose("LEFT_JOINING"), Some(JoiningType::LeftJoining));
// fake property
assert_eq!(lookup.get_strict("Inner_Joining"), None);
sourcepub fn get_name_to_enum_mapper(
provider: &(impl DataProvider<JoiningTypeNameToValueV1Marker> + ?Sized),
) -> Result<PropertyValueNameToEnumMapper<JoiningType>, PropertiesError>
pub fn get_name_to_enum_mapper( provider: &(impl DataProvider<JoiningTypeNameToValueV1Marker> + ?Sized), ) -> Result<PropertyValueNameToEnumMapper<JoiningType>, PropertiesError>
A version of JoiningType::name_to_enum_mapper()
that uses custom data provided by a DataProvider
.
sourcepub const fn enum_to_short_name_mapper() -> PropertyEnumToValueNameLinearMapperBorrowed<'static, JoiningType>
pub const fn enum_to_short_name_mapper() -> PropertyEnumToValueNameLinearMapperBorrowed<'static, JoiningType>
Return a PropertyEnumToValueNameLinearMapper
, capable of looking up short names
for values of the Joining_Type
enumerated property.
✨ Enabled with the compiled_data
Cargo feature.
§Example
use icu::properties::JoiningType;
let lookup = JoiningType::enum_to_short_name_mapper();
assert_eq!(lookup.get(JoiningType::JoinCausing), Some("C"));
assert_eq!(lookup.get(JoiningType::LeftJoining), Some("L"));
sourcepub fn get_enum_to_short_name_mapper(
provider: &(impl DataProvider<JoiningTypeValueToShortNameV1Marker> + ?Sized),
) -> Result<PropertyEnumToValueNameLinearMapper<JoiningType>, PropertiesError>
pub fn get_enum_to_short_name_mapper( provider: &(impl DataProvider<JoiningTypeValueToShortNameV1Marker> + ?Sized), ) -> Result<PropertyEnumToValueNameLinearMapper<JoiningType>, PropertiesError>
A version of JoiningType::enum_to_short_name_mapper()
that uses custom data provided by a DataProvider
.
sourcepub const fn enum_to_long_name_mapper() -> PropertyEnumToValueNameLinearMapperBorrowed<'static, JoiningType>
pub const fn enum_to_long_name_mapper() -> PropertyEnumToValueNameLinearMapperBorrowed<'static, JoiningType>
Return a PropertyEnumToValueNameLinearMapper
, capable of looking up long names
for values of the Joining_Type
enumerated property.
✨ Enabled with the compiled_data
Cargo feature.
§Example
use icu::properties::JoiningType;
let lookup = JoiningType::enum_to_long_name_mapper();
assert_eq!(lookup.get(JoiningType::Transparent), Some("Transparent"));
assert_eq!(lookup.get(JoiningType::NonJoining), Some("Non_Joining"));
assert_eq!(lookup.get(JoiningType::RightJoining), Some("Right_Joining"));
sourcepub fn get_enum_to_long_name_mapper(
provider: &(impl DataProvider<JoiningTypeValueToLongNameV1Marker> + ?Sized),
) -> Result<PropertyEnumToValueNameLinearMapper<JoiningType>, PropertiesError>
pub fn get_enum_to_long_name_mapper( provider: &(impl DataProvider<JoiningTypeValueToLongNameV1Marker> + ?Sized), ) -> Result<PropertyEnumToValueNameLinearMapper<JoiningType>, PropertiesError>
A version of JoiningType::enum_to_long_name_mapper()
that uses custom data provided by a DataProvider
.
Trait Implementations§
source§impl AsULE for JoiningType
impl AsULE for JoiningType
source§type ULE = JoiningTypeULE
type ULE = JoiningTypeULE
Self
. Read moresource§fn to_unaligned(self) -> Self::ULE
fn to_unaligned(self) -> Self::ULE
source§fn from_unaligned(unaligned: Self::ULE) -> Self
fn from_unaligned(unaligned: Self::ULE) -> Self
source§impl Clone for JoiningType
impl Clone for JoiningType
source§fn clone(&self) -> JoiningType
fn clone(&self) -> JoiningType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for JoiningType
impl Debug for JoiningType
source§impl Hash for JoiningType
impl Hash for JoiningType
source§impl Ord for JoiningType
impl Ord for JoiningType
source§fn cmp(&self, other: &JoiningType) -> Ordering
fn cmp(&self, other: &JoiningType) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for JoiningType
impl PartialEq for JoiningType
source§impl PartialOrd for JoiningType
impl PartialOrd for JoiningType
source§impl TrieValue for JoiningType
impl TrieValue for JoiningType
source§type TryFromU32Error = TryFromIntError
type TryFromU32Error = TryFromIntError
source§fn try_from_u32(i: u32) -> Result<Self, Self::TryFromU32Error>
fn try_from_u32(i: u32) -> Result<Self, Self::TryFromU32Error>
u32
first.source§impl<'a> ZeroMapKV<'a> for JoiningType
impl<'a> ZeroMapKV<'a> for JoiningType
source§type Container = ZeroVec<'a, JoiningType>
type Container = ZeroVec<'a, JoiningType>
ZeroVec
or VarZeroVec
.type Slice = ZeroSlice<JoiningType>
source§type GetType = JoiningTypeULE
type GetType = JoiningTypeULE
Container::get()
Read moresource§type OwnedType = JoiningType
type OwnedType = JoiningType
Container::replace()
and Container::remove()
,
also used during deserialization. If Self
is human readable serialized,
deserializing to Self::OwnedType
should produce the same value once
passed through Self::owned_as_self()
Read moreimpl Copy for JoiningType
impl Eq for JoiningType
impl StructuralPartialEq for JoiningType
Auto Trait Implementations§
impl Freeze for JoiningType
impl RefUnwindSafe for JoiningType
impl Send for JoiningType
impl Sync for JoiningType
impl Unpin for JoiningType
impl UnwindSafe for JoiningType
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)