Enum unicode_script::Script

source ·
#[non_exhaustive]
#[repr(u8)]
pub enum Script {
Show 171 variants Unknown = 255, Common = 254, Inherited = 253, Adlam = 0, Caucasian_Albanian = 1, Ahom = 2, Arabic = 3, Imperial_Aramaic = 4, Armenian = 5, Avestan = 6, Balinese = 7, Bamum = 8, Bassa_Vah = 9, Batak = 10, Bengali = 11, Bhaiksuki = 12, Bopomofo = 13, Brahmi = 14, Braille = 15, Buginese = 16, Buhid = 17, Chakma = 18, Canadian_Aboriginal = 19, Carian = 20, Cham = 21, Cherokee = 22, Chorasmian = 23, Coptic = 24, Cypro_Minoan = 25, Cypriot = 26, Cyrillic = 27, Devanagari = 28, Dives_Akuru = 29, Dogra = 30, Deseret = 31, Duployan = 32, Egyptian_Hieroglyphs = 33, Elbasan = 34, Elymaic = 35, Ethiopic = 36, Garay = 37, Georgian = 38, Glagolitic = 39, Gunjala_Gondi = 40, Masaram_Gondi = 41, Gothic = 42, Grantha = 43, Greek = 44, Gujarati = 45, Gurung_Khema = 46, Gurmukhi = 47, Hangul = 48, Han = 49, Hanunoo = 50, Hatran = 51, Hebrew = 52, Hiragana = 53, Anatolian_Hieroglyphs = 54, Pahawh_Hmong = 55, Nyiakeng_Puachue_Hmong = 56, Old_Hungarian = 57, Old_Italic = 58, Javanese = 59, Kayah_Li = 60, Katakana = 61, Kawi = 62, Kharoshthi = 63, Khmer = 64, Khojki = 65, Khitan_Small_Script = 66, Kannada = 67, Kirat_Rai = 68, Kaithi = 69, Tai_Tham = 70, Lao = 71, Latin = 72, Lepcha = 73, Limbu = 74, Linear_A = 75, Linear_B = 76, Lisu = 77, Lycian = 78, Lydian = 79, Mahajani = 80, Makasar = 81, Mandaic = 82, Manichaean = 83, Marchen = 84, Medefaidrin = 85, Mende_Kikakui = 86, Meroitic_Cursive = 87, Meroitic_Hieroglyphs = 88, Malayalam = 89, Modi = 90, Mongolian = 91, Mro = 92, Meetei_Mayek = 93, Multani = 94, Myanmar = 95, Nag_Mundari = 96, Nandinagari = 97, Old_North_Arabian = 98, Nabataean = 99, Newa = 100, Nko = 101, Nushu = 102, Ogham = 103, Ol_Chiki = 104, Ol_Onal = 105, Old_Turkic = 106, Oriya = 107, Osage = 108, Osmanya = 109, Old_Uyghur = 110, Palmyrene = 111, Pau_Cin_Hau = 112, Old_Permic = 113, Phags_Pa = 114, Inscriptional_Pahlavi = 115, Psalter_Pahlavi = 116, Phoenician = 117, Miao = 118, Inscriptional_Parthian = 119, Rejang = 120, Hanifi_Rohingya = 121, Runic = 122, Samaritan = 123, Old_South_Arabian = 124, Saurashtra = 125, SignWriting = 126, Shavian = 127, Sharada = 128, Siddham = 129, Khudawadi = 130, Sinhala = 131, Sogdian = 132, Old_Sogdian = 133, Sora_Sompeng = 134, Soyombo = 135, Sundanese = 136, Sunuwar = 137, Syloti_Nagri = 138, Syriac = 139, Tagbanwa = 140, Takri = 141, Tai_Le = 142, New_Tai_Lue = 143, Tamil = 144, Tangut = 145, Tai_Viet = 146, Telugu = 147, Tifinagh = 148, Tagalog = 149, Thaana = 150, Thai = 151, Tibetan = 152, Tirhuta = 153, Tangsa = 154, Todhri = 155, Toto = 156, Tulu_Tigalari = 157, Ugaritic = 158, Vai = 159, Vithkuqi = 160, Warang_Citi = 161, Wancho = 162, Old_Persian = 163, Cuneiform = 164, Yezidi = 165, Yi = 166, Zanabazar_Square = 167,
}
Expand description

A value of the Script property

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Unknown = 255

Unknown script

§

Common = 254

Zyyy

§

Inherited = 253

Zinh,

§

Adlam = 0

Adlm

§

Caucasian_Albanian = 1

Aghb

§

Ahom = 2

Ahom

§

Arabic = 3

Arab

§

Imperial_Aramaic = 4

Armi

§

Armenian = 5

Armn

§

Avestan = 6

Avst

§

Balinese = 7

Bali

§

Bamum = 8

Bamu

§

Bassa_Vah = 9

Bass

§

Batak = 10

Batk

§

Bengali = 11

Beng

§

Bhaiksuki = 12

Bhks

§

Bopomofo = 13

Bopo

§

Brahmi = 14

Brah

§

Braille = 15

Brai

§

Buginese = 16

Bugi

§

Buhid = 17

Buhd

§

Chakma = 18

Cakm

§

Canadian_Aboriginal = 19

Cans

§

Carian = 20

Cari

§

Cham = 21

Cham

§

Cherokee = 22

Cher

§

Chorasmian = 23

Chrs

§

Coptic = 24

Copt

§

Cypro_Minoan = 25

Cpmn

§

Cypriot = 26

Cprt

§

Cyrillic = 27

Cyrl

§

Devanagari = 28

Deva

§

Dives_Akuru = 29

Diak

§

Dogra = 30

Dogr

§

Deseret = 31

Dsrt

§

Duployan = 32

Dupl

§

Egyptian_Hieroglyphs = 33

Egyp

§

Elbasan = 34

Elba

§

Elymaic = 35

Elym

§

Ethiopic = 36

Ethi

§

Garay = 37

Gara

§

Georgian = 38

Geor

§

Glagolitic = 39

Glag

§

Gunjala_Gondi = 40

Gong

§

Masaram_Gondi = 41

Gonm

§

Gothic = 42

Goth

§

Grantha = 43

Gran

§

Greek = 44

Grek

§

Gujarati = 45

Gujr

§

Gurung_Khema = 46

Gukh

§

Gurmukhi = 47

Guru

§

Hangul = 48

Hang

§

Han = 49

Hani

§

Hanunoo = 50

Hano

§

Hatran = 51

Hatr

§

Hebrew = 52

Hebr

§

Hiragana = 53

Hira

§

Anatolian_Hieroglyphs = 54

Hluw

§

Pahawh_Hmong = 55

Hmng

§

Nyiakeng_Puachue_Hmong = 56

Hmnp

§

Old_Hungarian = 57

Hung

§

Old_Italic = 58

Ital

§

Javanese = 59

Java

§

Kayah_Li = 60

Kali

§

Katakana = 61

Kana

§

Kawi = 62

Kawi

§

Kharoshthi = 63

Khar

§

Khmer = 64

Khmr

§

Khojki = 65

Khoj

§

Khitan_Small_Script = 66

Kits

§

Kannada = 67

Knda

§

Kirat_Rai = 68

Krai

§

Kaithi = 69

Kthi

§

Tai_Tham = 70

Lana

§

Lao = 71

Laoo

§

Latin = 72

Latn

§

Lepcha = 73

Lepc

§

Limbu = 74

Limb

§

Linear_A = 75

Lina

§

Linear_B = 76

Linb

§

Lisu = 77

Lisu

§

Lycian = 78

Lyci

§

Lydian = 79

Lydi

§

Mahajani = 80

Mahj

§

Makasar = 81

Maka

§

Mandaic = 82

Mand

§

Manichaean = 83

Mani

§

Marchen = 84

Marc

§

Medefaidrin = 85

Medf

§

Mende_Kikakui = 86

Mend

§

Meroitic_Cursive = 87

Merc

§

Meroitic_Hieroglyphs = 88

Mero

§

Malayalam = 89

Mlym

§

Modi = 90

Modi

§

Mongolian = 91

Mong

§

Mro = 92

Mroo

§

Meetei_Mayek = 93

Mtei

§

Multani = 94

Mult

§

Myanmar = 95

Mymr

§

Nag_Mundari = 96

Nagm

§

Nandinagari = 97

Nand

§

Old_North_Arabian = 98

Narb

§

Nabataean = 99

Nbat

§

Newa = 100

Newa

§

Nko = 101

Nkoo

§

Nushu = 102

Nshu

§

Ogham = 103

Ogam

§

Ol_Chiki = 104

Olck

§

Ol_Onal = 105

Onao

§

Old_Turkic = 106

Orkh

§

Oriya = 107

Orya

§

Osage = 108

Osge

§

Osmanya = 109

Osma

§

Old_Uyghur = 110

Ougr

§

Palmyrene = 111

Palm

§

Pau_Cin_Hau = 112

Pauc

§

Old_Permic = 113

Perm

§

Phags_Pa = 114

Phag

§

Inscriptional_Pahlavi = 115

Phli

§

Psalter_Pahlavi = 116

Phlp

§

Phoenician = 117

Phnx

§

Miao = 118

Plrd

§

Inscriptional_Parthian = 119

Prti

§

Rejang = 120

Rjng

§

Hanifi_Rohingya = 121

Rohg

§

Runic = 122

Runr

§

Samaritan = 123

Samr

§

Old_South_Arabian = 124

Sarb

§

Saurashtra = 125

Saur

§

SignWriting = 126

Sgnw

§

Shavian = 127

Shaw

§

Sharada = 128

Shrd

§

Siddham = 129

Sidd

§

Khudawadi = 130

Sind

§

Sinhala = 131

Sinh

§

Sogdian = 132

Sogd

§

Old_Sogdian = 133

Sogo

§

Sora_Sompeng = 134

Sora

§

Soyombo = 135

Soyo

§

Sundanese = 136

Sund

§

Sunuwar = 137

Sunu

§

Syloti_Nagri = 138

Sylo

§

Syriac = 139

Syrc

§

Tagbanwa = 140

Tagb

§

Takri = 141

Takr

§

Tai_Le = 142

Tale

§

New_Tai_Lue = 143

Talu

§

Tamil = 144

Taml

§

Tangut = 145

Tang

§

Tai_Viet = 146

Tavt

§

Telugu = 147

Telu

§

Tifinagh = 148

Tfng

§

Tagalog = 149

Tglg

§

Thaana = 150

Thaa

§

Thai = 151

Thai

§

Tibetan = 152

Tibt

§

Tirhuta = 153

Tirh

§

Tangsa = 154

Tnsa

§

Todhri = 155

Todr

§

Toto = 156

Toto

§

Tulu_Tigalari = 157

Tutg

§

Ugaritic = 158

Ugar

§

Vai = 159

Vaii

§

Vithkuqi = 160

Vith

§

Warang_Citi = 161

Wara

§

Wancho = 162

Wcho

§

Old_Persian = 163

Xpeo

§

Cuneiform = 164

Xsux

§

Yezidi = 165

Yezi

§

Yi = 166

Yiii

§

Zanabazar_Square = 167

Zanb

Implementations§

source§

impl Script

source

pub(crate) fn inner_full_name(self) -> &'static str

source

pub(crate) fn inner_from_full_name(input: &str) -> Option<Self>

source

pub(crate) fn inner_short_name(self) -> &'static str

source

pub(crate) fn inner_from_short_name(input: &str) -> Option<Self>

source

pub(crate) fn for_integer(value: u8) -> Self

source§

impl Script

source

pub fn full_name(self) -> &'static str

Get the full name of a script.

source

pub fn from_full_name(input: &str) -> Option<Self>

Attempts to parse script name from the provided string. Returns None if the provided string does not represent a valid script full name.

source

pub fn short_name(self) -> &'static str

Get the four-character short name of a script.

source

pub fn from_short_name(input: &str) -> Option<Self>

Attempts to parse script name from the provided string. Returns None if the provided string does not represent a valid script four-character short name.

Is this script “Recommended” according to UAX #31?

Trait Implementations§

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 Default for Script

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Display for Script

source§

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

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

impl From<Script> for ScriptExtension

source§

fn from(script: Script) -> Self

Converts to this type from the input type.
source§

impl From<char> for Script

source§

fn from(o: char) -> Self

Converts to this type from the input type.
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 PartialEq for Script

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl TryFrom<ScriptExtension> for Script

§

type Error = ()

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

fn try_from(ext: ScriptExtension) -> Result<Self, ()>

Performs the conversion.
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> 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.