icu_properties

Struct Script

Source
#[repr(transparent)]
pub struct Script(pub u16);
Expand description

Enumerated property Script.

This is used with both the Script and Script_Extensions Unicode properties. Each character is assigned a single Script, but characters that are used in a particular subset of scripts will be in more than one Script_Extensions set. For example, DEVANAGARI DIGIT NINE has Script=Devanagari, but is also in the Script_Extensions set for Dogra, Kaithi, and Mahajani.

For more information, see UAX #24: http://www.unicode.org/reports/tr24/. See UScriptCode in ICU4C.

Tuple Fields§

§0: u16

Implementations§

Source§

impl Script

Source

pub const Adlam: Script

Source

pub const Ahom: Script

Source

pub const AnatolianHieroglyphs: Script

Source

pub const Arabic: Script

Source

pub const Armenian: Script

Source

pub const Avestan: Script

Source

pub const Balinese: Script

Source

pub const Bamum: Script

Source

pub const BassaVah: Script

Source

pub const Batak: Script

Source

pub const Bengali: Script

Source

pub const Bhaiksuki: Script

Source

pub const Bopomofo: Script

Source

pub const Brahmi: Script

Source

pub const Braille: Script

Source

pub const Buginese: Script

Source

pub const Buhid: Script

Source

pub const CanadianAboriginal: Script

Source

pub const Carian: Script

Source

pub const CaucasianAlbanian: Script

Source

pub const Chakma: Script

Source

pub const Cham: Script

Source

pub const Cherokee: Script

Source

pub const Chorasmian: Script

Source

pub const Common: Script

Source

pub const Coptic: Script

Source

pub const Cuneiform: Script

Source

pub const Cypriot: Script

Source

pub const CyproMinoan: Script

Source

pub const Cyrillic: Script

Source

pub const Deseret: Script

Source

pub const Devanagari: Script

Source

pub const DivesAkuru: Script

Source

pub const Dogra: Script

Source

pub const Duployan: Script

Source

pub const EgyptianHieroglyphs: Script

Source

pub const Elbasan: Script

Source

pub const Elymaic: Script

Source

pub const Ethiopian: Script

Source

pub const Georgian: Script

Source

pub const Glagolitic: Script

Source

pub const Gothic: Script

Source

pub const Grantha: Script

Source

pub const Greek: Script

Source

pub const Gujarati: Script

Source

pub const GunjalaGondi: Script

Source

pub const Gurmukhi: Script

Source

pub const Han: Script

Source

pub const Hangul: Script

Source

pub const HanifiRohingya: Script

Source

pub const Hanunoo: Script

Source

pub const Hatran: Script

Source

pub const Hebrew: Script

Source

pub const Hiragana: Script

Source

pub const ImperialAramaic: Script

Source

pub const Inherited: Script

Source

pub const InscriptionalPahlavi: Script

Source

pub const InscriptionalParthian: Script

Source

pub const Javanese: Script

Source

pub const Kaithi: Script

Source

pub const Kannada: Script

Source

pub const Katakana: Script

Source

pub const Kawi: Script

Source

pub const KayahLi: Script

Source

pub const Kharoshthi: Script

Source

pub const KhitanSmallScript: Script

Source

pub const Khmer: Script

Source

pub const Khojki: Script

Source

pub const Khudawadi: Script

Source

pub const Lao: Script

Source

pub const Latin: Script

Source

pub const Lepcha: Script

Source

pub const Limbu: Script

Source

pub const LinearA: Script

Source

pub const LinearB: Script

Source

pub const Lisu: Script

Source

pub const Lycian: Script

Source

pub const Lydian: Script

Source

pub const Mahajani: Script

Source

pub const Makasar: Script

Source

pub const Malayalam: Script

Source

pub const Mandaic: Script

Source

pub const Manichaean: Script

Source

pub const Marchen: Script

Source

pub const MasaramGondi: Script

Source

pub const Medefaidrin: Script

Source

pub const MeeteiMayek: Script

Source

pub const MendeKikakui: Script

Source

pub const MeroiticCursive: Script

Source

pub const MeroiticHieroglyphs: Script

Source

pub const Miao: Script

Source

pub const Modi: Script

Source

pub const Mongolian: Script

Source

pub const Mro: Script

Source

pub const Multani: Script

Source

pub const Myanmar: Script

Source

pub const Nabataean: Script

Source

pub const NagMundari: Script

Source

pub const Nandinagari: Script

Source

pub const Nastaliq: Script

Source

pub const NewTaiLue: Script

Source

pub const Newa: Script

Source

pub const Nko: Script

Source

pub const Nushu: Script

Source

pub const NyiakengPuachueHmong: Script

Source

pub const Ogham: Script

Source

pub const OlChiki: Script

Source

pub const OldHungarian: Script

Source

pub const OldItalic: Script

Source

pub const OldNorthArabian: Script

Source

pub const OldPermic: Script

Source

pub const OldPersian: Script

Source

pub const OldSogdian: Script

Source

pub const OldSouthArabian: Script

Source

pub const OldTurkic: Script

Source

pub const OldUyghur: Script

Source

pub const Oriya: Script

Source

pub const Osage: Script

Source

pub const Osmanya: Script

Source

pub const PahawhHmong: Script

Source

pub const Palmyrene: Script

Source

pub const PauCinHau: Script

Source

pub const PhagsPa: Script

Source

pub const Phoenician: Script

Source

pub const PsalterPahlavi: Script

Source

pub const Rejang: Script

Source

pub const Runic: Script

Source

pub const Samaritan: Script

Source

pub const Saurashtra: Script

Source

pub const Sharada: Script

Source

pub const Shavian: Script

Source

pub const Siddham: Script

Source

pub const SignWriting: Script

Source

pub const Sinhala: Script

Source

pub const Sogdian: Script

Source

pub const SoraSompeng: Script

Source

pub const Soyombo: Script

Source

pub const Sundanese: Script

Source

pub const SylotiNagri: Script

Source

pub const Syriac: Script

Source

pub const Tagalog: Script

Source

pub const Tagbanwa: Script

Source

pub const TaiLe: Script

Source

pub const TaiTham: Script

Source

pub const TaiViet: Script

Source

pub const Takri: Script

Source

pub const Tamil: Script

Source

pub const Tangsa: Script

Source

pub const Tangut: Script

Source

pub const Telugu: Script

Source

pub const Thaana: Script

Source

pub const Thai: Script

Source

pub const Tibetan: Script

Source

pub const Tifinagh: Script

Source

pub const Tirhuta: Script

Source

pub const Toto: Script

Source

pub const Ugaritic: Script

Source

pub const Unknown: Script

Source

pub const Vai: Script

Source

pub const Vithkuqi: Script

Source

pub const Wancho: Script

Source

pub const WarangCiti: Script

Source

pub const Yezidi: Script

Source

pub const Yi: Script

Source

pub const ZanabazarSquare: Script

Source§

impl Script

Source

pub const fn name_to_enum_mapper() -> PropertyValueNameToEnumMapperBorrowed<'static, Script>

Return a PropertyValueNameToEnumMapper, capable of looking up values from strings for the Script enumerated property.

Enabled with the compiled_data Cargo feature.

📚 Help choosing a constructor

§Example
use icu::properties::Script;

let lookup = Script::name_to_enum_mapper();
// short name for value
assert_eq!(lookup.get_strict("Brah"), Some(Script::Brahmi));
assert_eq!(lookup.get_strict("Hang"), Some(Script::Hangul));
// long name for value
assert_eq!(lookup.get_strict("Brahmi"), Some(Script::Brahmi));
assert_eq!(lookup.get_strict("Hangul"), Some(Script::Hangul));
// name has incorrect casing
assert_eq!(lookup.get_strict("brahmi"), None);
// loose matching of name
assert_eq!(lookup.get_loose("brahmi"), Some(Script::Brahmi));
// fake property
assert_eq!(lookup.get_strict("Linear_Z"), None);
Source

pub fn get_name_to_enum_mapper( provider: &(impl DataProvider<ScriptNameToValueV1Marker> + ?Sized), ) -> Result<PropertyValueNameToEnumMapper<Script>, PropertiesError>

A version of Script::name_to_enum_mapper() that uses custom data provided by a DataProvider.

📚 Help choosing a constructor

Source

pub const fn enum_to_short_name_mapper() -> PropertyEnumToValueNameLinearTiny4MapperBorrowed<'static, Script>

Return a PropertyEnumToValueNameLinearMapper, capable of looking up short names for values of the Script enumerated property.

Enabled with the compiled_data Cargo feature.

📚 Help choosing a constructor

§Example
use icu::properties::Script;
use tinystr::tinystr;

let lookup = Script::enum_to_short_name_mapper();
assert_eq!(lookup.get(Script::Brahmi), Some(tinystr!(4, "Brah")));
assert_eq!(lookup.get(Script::Hangul), Some(tinystr!(4, "Hang")));
Source

pub fn get_enum_to_short_name_mapper( provider: &(impl DataProvider<ScriptValueToShortNameV1Marker> + ?Sized), ) -> Result<PropertyEnumToValueNameLinearTiny4Mapper<Script>, PropertiesError>

A version of Script::enum_to_short_name_mapper() that uses custom data provided by a DataProvider.

📚 Help choosing a constructor

Source

pub const fn enum_to_long_name_mapper() -> PropertyEnumToValueNameLinearMapperBorrowed<'static, Script>

Return a PropertyEnumToValueNameLinearTiny4Mapper, capable of looking up long names for values of the Script enumerated property.

Enabled with the compiled_data Cargo feature.

📚 Help choosing a constructor

§Example
use icu::properties::Script;

let lookup = Script::enum_to_long_name_mapper();
assert_eq!(lookup.get(Script::Brahmi), Some("Brahmi"));
assert_eq!(lookup.get(Script::Hangul), Some("Hangul"));
Source

pub fn get_enum_to_long_name_mapper( provider: &(impl DataProvider<ScriptValueToLongNameV1Marker> + ?Sized), ) -> Result<PropertyEnumToValueNameLinearMapper<Script>, PropertiesError>

A version of Script::enum_to_long_name_mapper() that uses custom data provided by a DataProvider.

📚 Help choosing a constructor

Trait Implementations§

Source§

impl AsULE for Script

Source§

type ULE = ScriptULE

The ULE type corresponding to Self. Read more
Source§

fn to_unaligned(self) -> Self::ULE

Converts from Self to Self::ULE. Read more
Source§

fn from_unaligned(unaligned: Self::ULE) -> Self

Converts from Self::ULE to Self. Read more
Source§

impl Clone for Script

Source§

fn clone(&self) -> Script

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Script

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Hash for Script

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for Script

Source§

fn cmp(&self, other: &Script) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for Script

Source§

fn eq(&self, other: &Script) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for Script

Source§

fn partial_cmp(&self, other: &Script) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl TrieValue for Script

Source§

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>

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§

fn to_u32(self) -> u32

A method for converting back to a u32 that can roundtrip through Self::try_from_u32(). The default implementation of this trait method panics in debug mode and returns 0 in release mode. Read more
Source§

impl<'a> ZeroMapKV<'a> for Script

Source§

type Container = ZeroVec<'a, Script>

The container that can be used with this type: ZeroVec or VarZeroVec.
Source§

type Slice = ZeroSlice<Script>

Source§

type GetType = ScriptULE

The type produced by Container::get() Read more
Source§

type OwnedType = Script

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
Source§

impl Copy for Script

Source§

impl Eq for Script

Source§

impl StructuralPartialEq for Script

Auto Trait Implementations§

§

impl Freeze for Script

§

impl RefUnwindSafe for Script

§

impl Send for Script

§

impl Sync for Script

§

impl Unpin for Script

§

impl UnwindSafe for Script

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

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>,

Source§

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