#[non_exhaustive]
#[repr(u8)]
pub enum Script {
Show 164 variants Unknown, Common, Inherited, Adlam, Caucasian_Albanian, Ahom, Arabic, Imperial_Aramaic, Armenian, Avestan, Balinese, Bamum, Bassa_Vah, Batak, Bengali, Bhaiksuki, Bopomofo, Brahmi, Braille, Buginese, Buhid, Chakma, Canadian_Aboriginal, Carian, Cham, Cherokee, Chorasmian, Coptic, Cypro_Minoan, Cypriot, Cyrillic, Devanagari, Dives_Akuru, Dogra, Deseret, Duployan, Egyptian_Hieroglyphs, Elbasan, Elymaic, Ethiopic, Georgian, Glagolitic, Gunjala_Gondi, Masaram_Gondi, Gothic, Grantha, Greek, Gujarati, Gurmukhi, Hangul, Han, Hanunoo, Hatran, Hebrew, Hiragana, Anatolian_Hieroglyphs, Pahawh_Hmong, Nyiakeng_Puachue_Hmong, Old_Hungarian, Old_Italic, Javanese, Kayah_Li, Katakana, Kawi, Kharoshthi, Khmer, Khojki, Khitan_Small_Script, Kannada, Kaithi, Tai_Tham, Lao, Latin, Lepcha, Limbu, Linear_A, Linear_B, Lisu, Lycian, Lydian, Mahajani, Makasar, Mandaic, Manichaean, Marchen, Medefaidrin, Mende_Kikakui, Meroitic_Cursive, Meroitic_Hieroglyphs, Malayalam, Modi, Mongolian, Mro, Meetei_Mayek, Multani, Myanmar, Nag_Mundari, Nandinagari, Old_North_Arabian, Nabataean, Newa, Nko, Nushu, Ogham, Ol_Chiki, Old_Turkic, Oriya, Osage, Osmanya, Old_Uyghur, Palmyrene, Pau_Cin_Hau, Old_Permic, Phags_Pa, Inscriptional_Pahlavi, Psalter_Pahlavi, Phoenician, Miao, Inscriptional_Parthian, Rejang, Hanifi_Rohingya, Runic, Samaritan, Old_South_Arabian, Saurashtra, SignWriting, Shavian, Sharada, Siddham, Khudawadi, Sinhala, Sogdian, Old_Sogdian, Sora_Sompeng, Soyombo, Sundanese, Syloti_Nagri, Syriac, Tagbanwa, Takri, Tai_Le, New_Tai_Lue, Tamil, Tangut, Tai_Viet, Telugu, Tifinagh, Tagalog, Thaana, Thai, Tibetan, Tirhuta, Tangsa, Toto, Ugaritic, Vai, Vithkuqi, Warang_Citi, Wancho, Old_Persian, Cuneiform, Yezidi, Yi, Zanabazar_Square,
}
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

Unknown script

§

Common

Zyyy

§

Inherited

Zinh,

§

Adlam

Adlm

§

Caucasian_Albanian

Aghb

§

Ahom

Ahom

§

Arabic

Arab

§

Imperial_Aramaic

Armi

§

Armenian

Armn

§

Avestan

Avst

§

Balinese

Bali

§

Bamum

Bamu

§

Bassa_Vah

Bass

§

Batak

Batk

§

Bengali

Beng

§

Bhaiksuki

Bhks

§

Bopomofo

Bopo

§

Brahmi

Brah

§

Braille

Brai

§

Buginese

Bugi

§

Buhid

Buhd

§

Chakma

Cakm

§

Canadian_Aboriginal

Cans

§

Carian

Cari

§

Cham

Cham

§

Cherokee

Cher

§

Chorasmian

Chrs

§

Coptic

Copt

§

Cypro_Minoan

Cpmn

§

Cypriot

Cprt

§

Cyrillic

Cyrl

§

Devanagari

Deva

§

Dives_Akuru

Diak

§

Dogra

Dogr

§

Deseret

Dsrt

§

Duployan

Dupl

§

Egyptian_Hieroglyphs

Egyp

§

Elbasan

Elba

§

Elymaic

Elym

§

Ethiopic

Ethi

§

Georgian

Geor

§

Glagolitic

Glag

§

Gunjala_Gondi

Gong

§

Masaram_Gondi

Gonm

§

Gothic

Goth

§

Grantha

Gran

§

Greek

Grek

§

Gujarati

Gujr

§

Gurmukhi

Guru

§

Hangul

Hang

§

Han

Hani

§

Hanunoo

Hano

§

Hatran

Hatr

§

Hebrew

Hebr

§

Hiragana

Hira

§

Anatolian_Hieroglyphs

Hluw

§

Pahawh_Hmong

Hmng

§

Nyiakeng_Puachue_Hmong

Hmnp

§

Old_Hungarian

Hung

§

Old_Italic

Ital

§

Javanese

Java

§

Kayah_Li

Kali

§

Katakana

Kana

§

Kawi

Kawi

§

Kharoshthi

Khar

§

Khmer

Khmr

§

Khojki

Khoj

§

Khitan_Small_Script

Kits

§

Kannada

Knda

§

Kaithi

Kthi

§

Tai_Tham

Lana

§

Lao

Laoo

§

Latin

Latn

§

Lepcha

Lepc

§

Limbu

Limb

§

Linear_A

Lina

§

Linear_B

Linb

§

Lisu

Lisu

§

Lycian

Lyci

§

Lydian

Lydi

§

Mahajani

Mahj

§

Makasar

Maka

§

Mandaic

Mand

§

Manichaean

Mani

§

Marchen

Marc

§

Medefaidrin

Medf

§

Mende_Kikakui

Mend

§

Meroitic_Cursive

Merc

§

Meroitic_Hieroglyphs

Mero

§

Malayalam

Mlym

§

Modi

Modi

§

Mongolian

Mong

§

Mro

Mroo

§

Meetei_Mayek

Mtei

§

Multani

Mult

§

Myanmar

Mymr

§

Nag_Mundari

Nagm

§

Nandinagari

Nand

§

Old_North_Arabian

Narb

§

Nabataean

Nbat

§

Newa

Newa

§

Nko

Nkoo

§

Nushu

Nshu

§

Ogham

Ogam

§

Ol_Chiki

Olck

§

Old_Turkic

Orkh

§

Oriya

Orya

§

Osage

Osge

§

Osmanya

Osma

§

Old_Uyghur

Ougr

§

Palmyrene

Palm

§

Pau_Cin_Hau

Pauc

§

Old_Permic

Perm

§

Phags_Pa

Phag

§

Inscriptional_Pahlavi

Phli

§

Psalter_Pahlavi

Phlp

§

Phoenician

Phnx

§

Miao

Plrd

§

Inscriptional_Parthian

Prti

§

Rejang

Rjng

§

Hanifi_Rohingya

Rohg

§

Runic

Runr

§

Samaritan

Samr

§

Old_South_Arabian

Sarb

§

Saurashtra

Saur

§

SignWriting

Sgnw

§

Shavian

Shaw

§

Sharada

Shrd

§

Siddham

Sidd

§

Khudawadi

Sind

§

Sinhala

Sinh

§

Sogdian

Sogd

§

Old_Sogdian

Sogo

§

Sora_Sompeng

Sora

§

Soyombo

Soyo

§

Sundanese

Sund

§

Syloti_Nagri

Sylo

§

Syriac

Syrc

§

Tagbanwa

Tagb

§

Takri

Takr

§

Tai_Le

Tale

§

New_Tai_Lue

Talu

§

Tamil

Taml

§

Tangut

Tang

§

Tai_Viet

Tavt

§

Telugu

Telu

§

Tifinagh

Tfng

§

Tagalog

Tglg

§

Thaana

Thaa

§

Thai

Thai

§

Tibetan

Tibt

§

Tirhuta

Tirh

§

Tangsa

Tnsa

§

Toto

Toto

§

Ugaritic

Ugar

§

Vai

Vaii

§

Vithkuqi

Vith

§

Warang_Citi

Wara

§

Wancho

Wcho

§

Old_Persian

Xpeo

§

Cuneiform

Xsux

§

Yezidi

Yezi

§

Yi

Yiii

§

Zanabazar_Square

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

source§

impl StructuralPartialEq for Script

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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 Twhere 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 Twhere 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.