pub struct EastAsianWidth(/* private fields */);
Expand description
Enumerated property East_Asian_Width.
See “Definition” in UAX #11 for the summary of each property value: https://www.unicode.org/reports/tr11/#Definitions
§Example
use icu::properties::{props::EastAsianWidth, CodePointMapData};
assert_eq!(
CodePointMapData::<EastAsianWidth>::new().get('ア'),
EastAsianWidth::Halfwidth
); // U+FF71: Halfwidth Katakana Letter A
assert_eq!(
CodePointMapData::<EastAsianWidth>::new().get('ア'),
EastAsianWidth::Wide
); //U+30A2: Katakana Letter A
Implementations§
Source§impl EastAsianWidth
impl EastAsianWidth
Sourcepub const fn to_icu4c_value(self) -> u8
pub const fn to_icu4c_value(self) -> u8
Returns an ICU4C UEastAsianWidth
value.
Sourcepub const fn from_icu4c_value(value: u8) -> EastAsianWidth
pub const fn from_icu4c_value(value: u8) -> EastAsianWidth
Constructor from an ICU4C UEastAsianWidth
value.
Source§impl EastAsianWidth
impl EastAsianWidth
pub const Neutral: EastAsianWidth
pub const Ambiguous: EastAsianWidth
pub const Halfwidth: EastAsianWidth
pub const Fullwidth: EastAsianWidth
pub const Narrow: EastAsianWidth
pub const Wide: EastAsianWidth
Sourcepub const ALL_VALUES: &'static [EastAsianWidth]
pub const ALL_VALUES: &'static [EastAsianWidth]
All possible values of this enum in the Unicode version from this ICU4X release.
Trait Implementations§
Source§impl AsULE for EastAsianWidth
impl AsULE for EastAsianWidth
Source§fn to_unaligned(self) -> <EastAsianWidth as AsULE>::ULE
fn to_unaligned(self) -> <EastAsianWidth as AsULE>::ULE
Source§fn from_unaligned(unaligned: <EastAsianWidth as AsULE>::ULE) -> EastAsianWidth
fn from_unaligned(unaligned: <EastAsianWidth as AsULE>::ULE) -> EastAsianWidth
Source§impl Clone for EastAsianWidth
impl Clone for EastAsianWidth
Source§fn clone(&self) -> EastAsianWidth
fn clone(&self) -> EastAsianWidth
Returns a copy 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 EastAsianWidth
impl Debug for EastAsianWidth
Source§impl<'de> Deserialize<'de> for EastAsianWidth
impl<'de> Deserialize<'de> for EastAsianWidth
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<EastAsianWidth, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<EastAsianWidth, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl EnumeratedProperty for EastAsianWidth
impl EnumeratedProperty for EastAsianWidth
Source§impl Hash for EastAsianWidth
impl Hash for EastAsianWidth
Source§impl NamedEnumeratedProperty for EastAsianWidth
impl NamedEnumeratedProperty for EastAsianWidth
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 EastAsianWidth
impl Ord for EastAsianWidth
Source§fn cmp(&self, other: &EastAsianWidth) -> Ordering
fn cmp(&self, other: &EastAsianWidth) -> 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 EastAsianWidth
impl PartialEq for EastAsianWidth
Source§impl PartialOrd for EastAsianWidth
impl PartialOrd for EastAsianWidth
Source§impl Serialize for EastAsianWidth
impl Serialize for EastAsianWidth
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl TrieValue for EastAsianWidth
impl TrieValue for EastAsianWidth
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<EastAsianWidth, <EastAsianWidth as TrieValue>::TryFromU32Error>
fn try_from_u32( i: u32, ) -> Result<EastAsianWidth, <EastAsianWidth as TrieValue>::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 EastAsianWidth
impl Eq for EastAsianWidth
impl ParseableEnumeratedProperty for EastAsianWidth
impl StructuralPartialEq for EastAsianWidth
Auto Trait Implementations§
impl Freeze for EastAsianWidth
impl RefUnwindSafe for EastAsianWidth
impl Send for EastAsianWidth
impl Sync for EastAsianWidth
impl Unpin for EastAsianWidth
impl UnwindSafe for EastAsianWidth
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more