pub struct BidiClass(/* private fields */);Expand description
Enumerated property Bidi_Class
These are the categories required by the Unicode Bidirectional Algorithm. For the property values, see Bidirectional Class Values. For more information, see Unicode Standard Annex #9.
§Example
use icu::properties::{CodePointMapData, props::BidiClass};
assert_eq!(
CodePointMapData::<BidiClass>::new().get('y'),
BidiClass::LeftToRight
); // U+0079
assert_eq!(
CodePointMapData::<BidiClass>::new().get('ع'),
BidiClass::ArabicLetter
); // U+0639Implementations§
Source§impl BidiClass
impl BidiClass
pub const LeftToRight: Self
pub const L: Self = Self::LeftToRight
pub const RightToLeft: Self
pub const R: Self = Self::RightToLeft
pub const EuropeanNumber: Self
pub const EN: Self = Self::EuropeanNumber
pub const EuropeanSeparator: Self
pub const ES: Self = Self::EuropeanSeparator
pub const EuropeanTerminator: Self
pub const ET: Self = Self::EuropeanTerminator
pub const ArabicNumber: Self
pub const AN: Self = Self::ArabicNumber
pub const CommonSeparator: Self
pub const CS: Self = Self::CommonSeparator
pub const ParagraphSeparator: Self
pub const B: Self = Self::ParagraphSeparator
pub const SegmentSeparator: Self
pub const S: Self = Self::SegmentSeparator
pub const WhiteSpace: Self
pub const WS: Self = Self::WhiteSpace
pub const OtherNeutral: Self
pub const ON: Self = Self::OtherNeutral
pub const LeftToRightEmbedding: Self
pub const LRE: Self = Self::LeftToRightEmbedding
pub const LeftToRightOverride: Self
pub const LRO: Self = Self::LeftToRightOverride
pub const ArabicLetter: Self
pub const AL: Self = Self::ArabicLetter
pub const RightToLeftEmbedding: Self
pub const RLE: Self = Self::RightToLeftEmbedding
pub const RightToLeftOverride: Self
pub const RLO: Self = Self::RightToLeftOverride
pub const PopDirectionalFormat: Self
pub const PDF: Self = Self::PopDirectionalFormat
pub const NonspacingMark: Self
pub const NSM: Self = Self::NonspacingMark
pub const BoundaryNeutral: Self
pub const BN: Self = Self::BoundaryNeutral
pub const FirstStrongIsolate: Self
pub const FSI: Self = Self::FirstStrongIsolate
pub const LeftToRightIsolate: Self
pub const LRI: Self = Self::LeftToRightIsolate
pub const RightToLeftIsolate: Self
pub const RLI: Self = Self::RightToLeftIsolate
pub const PopDirectionalIsolate: Self
pub const PDI: Self = Self::PopDirectionalIsolate
Source§impl BidiClass
impl BidiClass
Sourcepub const ALL_VALUES: &'static [Self]
👎Deprecated
pub const ALL_VALUES: &'static [Self]
Deprecated
Source§impl BidiClass
impl BidiClass
Sourcepub const fn to_icu4c_value(self) -> u8
👎Deprecated since 2.3.0: please comment on https://github.com/unicode-org/icu4x/issues/6067 if you need this
pub const fn to_icu4c_value(self) -> u8
please comment on https://github.com/unicode-org/icu4x/issues/6067 if you need this
Returns an ICU4C UBidiClass value.
Sourcepub const fn from_icu4c_value(value: u8) -> Self
👎Deprecated since 2.3.0: please comment on https://github.com/unicode-org/icu4x/issues/6067 if you need this
pub const fn from_icu4c_value(value: u8) -> Self
please comment on https://github.com/unicode-org/icu4x/issues/6067 if you need this
Constructor from an ICU4C UBidiClass value.
Trait Implementations§
impl Copy for BidiClass
Source§impl EnumeratedProperty for BidiClass
impl EnumeratedProperty for BidiClass
impl Eq for BidiClass
Source§impl NamedEnumeratedProperty for BidiClass
impl NamedEnumeratedProperty for BidiClass
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 BidiClass
impl Ord for BidiClass
1.21.0 (const: unstable) · 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
impl ParseableEnumeratedProperty for BidiClass
Source§impl PartialOrd for BidiClass
impl PartialOrd for BidiClass
impl StructuralPartialEq for BidiClass
Source§impl TrieValue for BidiClass
impl TrieValue for BidiClass
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.Auto Trait Implementations§
impl Freeze for BidiClass
impl RefUnwindSafe for BidiClass
impl Send for BidiClass
impl Sync for BidiClass
impl Unpin for BidiClass
impl UnsafeUnpin for BidiClass
impl UnwindSafe for BidiClass
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