Struct BidiClass
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::{props::BidiClass, CodePointMapData};
assert_eq!(
CodePointMapData::<BidiClass>::new().get('y'),
BidiClass::LeftToRight
); // U+0079
assert_eq!(
CodePointMapData::<BidiClass>::new().get('ع'),
BidiClass::ArabicLetter
); // U+0639Implementations§
§impl BidiClass
impl BidiClass
pub const fn to_icu4c_value(self) -> u8
pub const fn to_icu4c_value(self) -> u8
Returns an ICU4C UBidiClass value.
pub const fn from_icu4c_value(value: u8) -> BidiClass
pub const fn from_icu4c_value(value: u8) -> BidiClass
Constructor from an ICU4C UBidiClass value.
§impl BidiClass
impl BidiClass
pub const LeftToRight: BidiClass
pub const LeftToRight: BidiClass
(L) any strong left-to-right character
pub const RightToLeft: BidiClass
pub const RightToLeft: BidiClass
(R) any strong right-to-left (non-Arabic-type) character
pub const EuropeanNumber: BidiClass
pub const EuropeanNumber: BidiClass
(EN) any ASCII digit or Eastern Arabic-Indic digit
pub const EuropeanSeparator: BidiClass
pub const EuropeanSeparator: BidiClass
(ES) plus and minus signs
pub const EuropeanTerminator: BidiClass
pub const EuropeanTerminator: BidiClass
(ET) a terminator in a numeric format context, includes currency signs
pub const ArabicNumber: BidiClass
pub const ArabicNumber: BidiClass
(AN) any Arabic-Indic digit
pub const CommonSeparator: BidiClass
pub const CommonSeparator: BidiClass
(CS) commas, colons, and slashes
pub const ParagraphSeparator: BidiClass
pub const ParagraphSeparator: BidiClass
(B) various newline characters
pub const SegmentSeparator: BidiClass
pub const SegmentSeparator: BidiClass
(S) various segment-related control codes
pub const WhiteSpace: BidiClass
pub const WhiteSpace: BidiClass
(WS) spaces
pub const OtherNeutral: BidiClass
pub const OtherNeutral: BidiClass
(ON) most other symbols and punctuation marks
pub const LeftToRightEmbedding: BidiClass
pub const LeftToRightEmbedding: BidiClass
(LRE) U+202A: the LR embedding control
pub const LeftToRightOverride: BidiClass
pub const LeftToRightOverride: BidiClass
(LRO) U+202D: the LR override control
pub const ArabicLetter: BidiClass
pub const ArabicLetter: BidiClass
(AL) any strong right-to-left (Arabic-type) character
pub const RightToLeftEmbedding: BidiClass
pub const RightToLeftEmbedding: BidiClass
(RLE) U+202B: the RL embedding control
pub const RightToLeftOverride: BidiClass
pub const RightToLeftOverride: BidiClass
(RLO) U+202E: the RL override control
pub const PopDirectionalFormat: BidiClass
pub const PopDirectionalFormat: BidiClass
(PDF) U+202C: terminates an embedding or override control
pub const NonspacingMark: BidiClass
pub const NonspacingMark: BidiClass
(NSM) any nonspacing mark
pub const BoundaryNeutral: BidiClass
pub const BoundaryNeutral: BidiClass
(BN) most format characters, control codes, or noncharacters
pub const FirstStrongIsolate: BidiClass
pub const FirstStrongIsolate: BidiClass
(FSI) U+2068: the first strong isolate control
pub const LeftToRightIsolate: BidiClass
pub const LeftToRightIsolate: BidiClass
(LRI) U+2066: the LR isolate control
pub const RightToLeftIsolate: BidiClass
pub const RightToLeftIsolate: BidiClass
(RLI) U+2067: the RL isolate control
pub const PopDirectionalIsolate: BidiClass
pub const PopDirectionalIsolate: BidiClass
(PDI) U+2069: terminates an isolate control
pub const ALL_VALUES: &'static [BidiClass]
pub const ALL_VALUES: &'static [BidiClass]
All possible values of this enum in the Unicode version from this ICU4X release.
Trait Implementations§
§impl NamedEnumeratedProperty for BidiClass
impl NamedEnumeratedProperty for BidiClass
§fn try_from_str(s: &str) -> Option<Self>
fn try_from_str(s: &str) -> Option<Self>
PropertyParser::new().get_loose(s) Read more§fn long_name(&self) -> &'static str
fn long_name(&self) -> &'static str
PropertyNamesLong::new().get(*self).unwrap() Read more§fn short_name(&self) -> &'static str
fn short_name(&self) -> &'static str
PropertyNamesShort::new().get(*self).unwrap() Read more§impl Ord for BidiClass
impl Ord for BidiClass
§impl PartialOrd for BidiClass
impl PartialOrd for BidiClass
§impl TrieValue for BidiClass
impl TrieValue for BidiClass
§type TryFromU32Error = TryFromIntError
type TryFromU32Error = TryFromIntError
§fn try_from_u32(
i: u32,
) -> Result<BidiClass, <BidiClass as TrieValue>::TryFromU32Error>
fn try_from_u32( i: u32, ) -> Result<BidiClass, <BidiClass as TrieValue>::TryFromU32Error>
u32 first.impl Copy for BidiClass
impl Eq for BidiClass
impl ParseableEnumeratedProperty for BidiClass
impl StructuralPartialEq for BidiClass
Auto Trait Implementations§
impl Freeze for BidiClass
impl RefUnwindSafe for BidiClass
impl Send for BidiClass
impl Sync for BidiClass
impl Unpin for BidiClass
impl UnwindSafe for BidiClass
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling [Attribute] value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi [Quirk] value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the [Condition] value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);