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