Struct icu::properties::EastAsianWidth
source · pub struct EastAsianWidth(pub u8);
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
The numeric value is compatible with UEastAsianWidth
in ICU4C.
Tuple Fields§
§0: u8
Implementations§
source§impl EastAsianWidth
impl EastAsianWidth
pub const Neutral: EastAsianWidth = EastAsianWidth(0)
pub const Ambiguous: EastAsianWidth = EastAsianWidth(1)
pub const Halfwidth: EastAsianWidth = EastAsianWidth(2)
pub const Fullwidth: EastAsianWidth = EastAsianWidth(3)
pub const Narrow: EastAsianWidth = EastAsianWidth(4)
pub const Wide: EastAsianWidth = EastAsianWidth(5)
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 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<EastAsianWidth> for EastAsianWidth
impl PartialEq<EastAsianWidth> for EastAsianWidth
source§fn eq(&self, other: &EastAsianWidth) -> bool
fn eq(&self, other: &EastAsianWidth) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<EastAsianWidth> for EastAsianWidth
impl PartialOrd<EastAsianWidth> for EastAsianWidth
source§fn partial_cmp(&self, other: &EastAsianWidth) -> Option<Ordering>
fn partial_cmp(&self, other: &EastAsianWidth) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§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
§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.source§impl<'a> ZeroMapKV<'a> for EastAsianWidth
impl<'a> ZeroMapKV<'a> for EastAsianWidth
§type Container = ZeroVec<'a, EastAsianWidth>
type Container = ZeroVec<'a, EastAsianWidth>
The container that can be used with this type: [
ZeroVec
] or [VarZeroVec
].type Slice = ZeroSlice<EastAsianWidth>
§type OwnedType = EastAsianWidth
type OwnedType = EastAsianWidth
The type produced by
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 more