Struct icu::properties::EastAsianWidth
source · [−]#[repr(transparent)]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
sourceimpl 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
Trait Implementations
sourceimpl AsULE for EastAsianWidth
impl AsULE for EastAsianWidth
sourcefn to_unaligned(self) -> <EastAsianWidth as AsULE>::ULE
fn to_unaligned(self) -> <EastAsianWidth as AsULE>::ULE
Converts from Self
to Self::ULE
. Read more
sourcefn from_unaligned(unaligned: <EastAsianWidth as AsULE>::ULE) -> EastAsianWidth
fn from_unaligned(unaligned: <EastAsianWidth as AsULE>::ULE) -> EastAsianWidth
Converts from Self::ULE
to Self
. Read more
sourceimpl Bake for EastAsianWidth
impl Bake for EastAsianWidth
sourcefn bake(&self, env: &CrateEnv) -> TokenStream
fn bake(&self, env: &CrateEnv) -> TokenStream
Returns a TokenStream
that would evaluate to self
. Read more
sourceimpl Clone for EastAsianWidth
impl Clone for EastAsianWidth
sourcefn clone(&self) -> EastAsianWidth
fn clone(&self) -> EastAsianWidth
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for EastAsianWidth
impl Debug for EastAsianWidth
sourceimpl<'de> Deserialize<'de> for EastAsianWidth
impl<'de> Deserialize<'de> for EastAsianWidth
sourcefn 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
sourceimpl Ord for EastAsianWidth
impl Ord for EastAsianWidth
sourceimpl PartialEq<EastAsianWidth> for EastAsianWidth
impl PartialEq<EastAsianWidth> for EastAsianWidth
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &EastAsianWidth) -> bool
fn ne(&self, other: &EastAsianWidth) -> bool
This method tests for !=
.
sourceimpl PartialOrd<EastAsianWidth> for EastAsianWidth
impl PartialOrd<EastAsianWidth> for EastAsianWidth
sourcefn partial_cmp(&self, other: &EastAsianWidth) -> Option<Ordering>
fn partial_cmp(&self, other: &EastAsianWidth) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
sourceimpl Serialize for EastAsianWidth
impl Serialize for EastAsianWidth
sourcefn 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
sourceimpl 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
sourcefn 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. Read more
sourceimpl<'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
impl Copy for EastAsianWidth
impl Eq for EastAsianWidth
impl StructuralEq for EastAsianWidth
impl StructuralPartialEq for EastAsianWidth
Auto Trait Implementations
impl RefUnwindSafe for EastAsianWidth
impl Send for EastAsianWidth
impl Sync for EastAsianWidth
impl Unpin for EastAsianWidth
impl UnwindSafe for EastAsianWidth
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
sourceimpl<T> Serialize for T where
T: Serialize + ?Sized,
impl<T> Serialize for T where
T: Serialize + ?Sized,
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more