pub struct BidiAuxiliaryPropertiesBorrowed<'a> {
    data: &'a BidiAuxiliaryPropertiesV1<'a>,
}
Expand description

A borrowed wrapper around Bidi properties data, returned by BidiAuxiliaryProperties::as_borrowed(). More efficient to query.

Fields§

§data: &'a BidiAuxiliaryPropertiesV1<'a>

Implementations§

source§

impl<'a> BidiAuxiliaryPropertiesBorrowed<'a>

source

fn convert_mirroring_glyph_data(trie_data_char: char) -> Option<char>

source

pub fn get32_mirroring_props(&self, code_point: u32) -> BidiMirroringProperties

Return a struct for the given code point representing Bidi mirroring-related property values. See BidiMirroringProperties.

§Examples
use icu::properties::bidi_data;

let bidi_data = bidi_data::bidi_auxiliary_properties();

let open_paren = bidi_data.get32_mirroring_props('(' as u32);
assert_eq!(open_paren.mirroring_glyph, Some(')'));
assert_eq!(open_paren.mirrored, true);
let close_paren = bidi_data.get32_mirroring_props(')' as u32);
assert_eq!(close_paren.mirroring_glyph, Some('('));
assert_eq!(close_paren.mirrored, true);
let open_angle_bracket = bidi_data.get32_mirroring_props('<' as u32);
assert_eq!(open_angle_bracket.mirroring_glyph, Some('>'));
assert_eq!(open_angle_bracket.mirrored, true);
let close_angle_bracket = bidi_data.get32_mirroring_props('>' as u32);
assert_eq!(close_angle_bracket.mirroring_glyph, Some('<'));
assert_eq!(close_angle_bracket.mirrored, true);
let three = bidi_data.get32_mirroring_props('3' as u32);
assert_eq!(three.mirroring_glyph, None);
assert_eq!(three.mirrored, false);
source

pub fn get32_pairing_props(&self, code_point: u32) -> BidiPairingProperties

Return a struct for the given code point representing Bidi bracket pairing-related property values. See BidiPairingProperties

§Examples
use icu::properties::{bidi_data, bidi_data::BidiPairingProperties};

let bidi_data = bidi_data::bidi_auxiliary_properties();

let open_paren = bidi_data.get32_pairing_props('(' as u32);
assert_eq!(open_paren, BidiPairingProperties::Open(')'));
let close_paren = bidi_data.get32_pairing_props(')' as u32);
assert_eq!(close_paren, BidiPairingProperties::Close('('));
let open_angle_bracket = bidi_data.get32_pairing_props('<' as u32);
assert_eq!(open_angle_bracket, BidiPairingProperties::None);
let close_angle_bracket = bidi_data.get32_pairing_props('>' as u32);
assert_eq!(close_angle_bracket, BidiPairingProperties::None);
let three = bidi_data.get32_pairing_props('3' as u32);
assert_eq!(three, BidiPairingProperties::None);
source§

impl BidiAuxiliaryPropertiesBorrowed<'static>

source

pub const fn static_to_owned(self) -> BidiAuxiliaryProperties

Cheaply converts a [BidiAuxiliaryPropertiesBorrowed<'static>] into a BidiAuxiliaryProperties.

Note: Due to branching and indirection, using BidiAuxiliaryProperties might inhibit some compile-time optimizations that are possible with BidiAuxiliaryPropertiesBorrowed.

Trait Implementations§

source§

impl<'a> Debug for BidiAuxiliaryPropertiesBorrowed<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> ErasedDestructor for T
where T: 'static,

source§

impl<T> MaybeSendSync for T