pub struct NumericType(/* private fields */);Expand description
Enumerated property Numeric_Type.
See Section 4.6, Numeric Value in The Unicode Standard for the summary of each property value.
§Example
use icu::properties::{props::NumericType, CodePointMapData};
assert_eq!(
CodePointMapData::<NumericType>::new().get('0'),
NumericType::Decimal,
); // U+0030
assert_eq!(
CodePointMapData::<NumericType>::new().get('½'),
NumericType::Numeric,
); // U+00BDImplementations§
Source§impl NumericType
impl NumericType
Sourcepub const fn to_icu4c_value(self) -> u8
pub const fn to_icu4c_value(self) -> u8
Returns an ICU4C UNumericType value.
Sourcepub const fn from_icu4c_value(value: u8) -> Self
pub const fn from_icu4c_value(value: u8) -> Self
Constructor from an ICU4C UNumericType value.
Source§impl NumericType
impl NumericType
Sourcepub const None: NumericType
pub const None: NumericType
Characters without numeric value
Sourcepub const Decimal: NumericType
pub const Decimal: NumericType
(De) Characters of positional decimal systems
These are coextensive with GeneralCategory::DecimalNumber.
Sourcepub const Digit: NumericType
pub const Digit: NumericType
(Di) Variants of positional or sequences thereof.
The distinction between NumericType::Digit and NumericType::Numeric
has not proven to be useful, so no further characters will be added to
this type.
Sourcepub const Numeric: NumericType
pub const Numeric: NumericType
(Nu) Other characters with numeric value
Sourcepub const ALL_VALUES: &'static [NumericType]
pub const ALL_VALUES: &'static [NumericType]
All possible values of this enum in the Unicode version from this ICU4X release.
Trait Implementations§
Source§impl AsULE for NumericType
impl AsULE for NumericType
Source§impl Clone for NumericType
impl Clone for NumericType
Source§fn clone(&self) -> NumericType
fn clone(&self) -> NumericType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NumericType
impl Debug for NumericType
Source§impl EnumeratedProperty for NumericType
impl EnumeratedProperty for NumericType
Source§impl From<NumericType> for u16
impl From<NumericType> for u16
Source§fn from(other: NumericType) -> Self
fn from(other: NumericType) -> Self
Converts to this type from the input type.
Source§impl Hash for NumericType
impl Hash for NumericType
Source§impl NamedEnumeratedProperty for NumericType
impl NamedEnumeratedProperty for NumericType
Source§fn try_from_str(s: &str) -> Option<Self>
fn try_from_str(s: &str) -> Option<Self>
Convenience method for
PropertyParser::new().get_loose(s) Read moreSource§fn long_name(&self) -> &'static str
fn long_name(&self) -> &'static str
Convenience method for
PropertyNamesLong::new().get(*self).unwrap() Read moreSource§fn short_name(&self) -> &'static str
fn short_name(&self) -> &'static str
Convenience method for
PropertyNamesShort::new().get(*self).unwrap() Read moreSource§impl Ord for NumericType
impl Ord for NumericType
Source§fn cmp(&self, other: &NumericType) -> Ordering
fn cmp(&self, other: &NumericType) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for NumericType
impl PartialEq for NumericType
Source§impl PartialOrd for NumericType
impl PartialOrd for NumericType
Source§impl TrieValue for NumericType
impl TrieValue for NumericType
Source§type TryFromU32Error = TryFromIntError
type TryFromU32Error = TryFromIntError
Last-resort fallback value to return if we cannot read data from the trie. Read more
Source§fn try_from_u32(i: u32) -> Result<Self, Self::TryFromU32Error>
fn try_from_u32(i: u32) -> Result<Self, Self::TryFromU32Error>
A parsing function that is primarily motivated by deserialization contexts.
When the serialization type width is smaller than 32 bits, then it is expected
that the call site will widen the value to a
u32 first.impl Copy for NumericType
impl Eq for NumericType
impl ParseableEnumeratedProperty for NumericType
impl StructuralPartialEq for NumericType
Auto Trait Implementations§
impl Freeze for NumericType
impl RefUnwindSafe for NumericType
impl Send for NumericType
impl Sync for NumericType
impl Unpin for NumericType
impl UnsafeUnpin for NumericType
impl UnwindSafe for NumericType
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