pub struct Script(/* private fields */);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. If you are trying to
determine whether a code point belongs to a certain script, you should use
ScriptWithExtensionsBorrowed::has_script.
For more information, see UAX #24: https://www.unicode.org/reports/tr24/.
Additional constants are provided for ISO 15924 script codes, even if these are not encoded in
Unicode. For example, Han is a Unicode script (corresponding to the ISO 15924 code Hani),
but ISO 15924 also defines Hans and Hant for simplified and traditional Han.
Such constants are documented as non-Unicode constants, and are not returned as the Script
property for any code point.
§Example
use icu::properties::{CodePointMapData, props::Script};
assert_eq!(CodePointMapData::<Script>::new().get('木'), Script::Han); // U+6728
assert_eq!(CodePointMapData::<Script>::new().get('🎃'), Script::Common); // U+1F383 JACK-O-LANTERNImplementations§
Source§impl Script
impl Script
pub const Common: Self
pub const Zyyy: Self = Self::Common
pub const Inherited: Self
pub const Zinh: Self = Self::Inherited
pub const Qaai: Self = Self::Inherited
pub const Arabic: Self
pub const Arab: Self = Self::Arabic
pub const Armenian: Self
pub const Armn: Self = Self::Armenian
pub const Bengali: Self
pub const Beng: Self = Self::Bengali
pub const Bopomofo: Self
pub const Bopo: Self = Self::Bopomofo
pub const Cherokee: Self
pub const Cher: Self = Self::Cherokee
pub const Coptic: Self
pub const Copt: Self = Self::Coptic
pub const Qaac: Self = Self::Coptic
pub const Cyrillic: Self
pub const Cyrl: Self = Self::Cyrillic
pub const Deseret: Self
pub const Dsrt: Self = Self::Deseret
pub const Devanagari: Self
pub const Deva: Self = Self::Devanagari
pub const Ethiopic: Self
pub const Ethi: Self = Self::Ethiopic
pub const Georgian: Self
pub const Geor: Self = Self::Georgian
pub const Gothic: Self
pub const Goth: Self = Self::Gothic
pub const Greek: Self
pub const Grek: Self = Self::Greek
pub const Gujarati: Self
pub const Gujr: Self = Self::Gujarati
pub const Gurmukhi: Self
pub const Guru: Self = Self::Gurmukhi
pub const Han: Self
pub const Hani: Self = Self::Han
pub const Hangul: Self
pub const Hang: Self = Self::Hangul
pub const Hebrew: Self
pub const Hebr: Self = Self::Hebrew
pub const Hiragana: Self
pub const Hira: Self = Self::Hiragana
pub const Kannada: Self
pub const Knda: Self = Self::Kannada
pub const Katakana: Self
pub const Kana: Self = Self::Katakana
pub const Khmer: Self
pub const Khmr: Self = Self::Khmer
pub const Lao: Self
pub const Laoo: Self = Self::Lao
pub const Latin: Self
pub const Latn: Self = Self::Latin
pub const Malayalam: Self
pub const Mlym: Self = Self::Malayalam
pub const Mongolian: Self
pub const Mong: Self = Self::Mongolian
pub const Myanmar: Self
pub const Mymr: Self = Self::Myanmar
pub const Ogham: Self
pub const Ogam: Self = Self::Ogham
pub const OldItalic: Self
pub const Ital: Self = Self::OldItalic
pub const Oriya: Self
pub const Orya: Self = Self::Oriya
pub const Runic: Self
pub const Runr: Self = Self::Runic
pub const Sinhala: Self
pub const Sinh: Self = Self::Sinhala
pub const Syriac: Self
pub const Syrc: Self = Self::Syriac
pub const Tamil: Self
pub const Taml: Self = Self::Tamil
pub const Telugu: Self
pub const Telu: Self = Self::Telugu
pub const Thaana: Self
pub const Thaa: Self = Self::Thaana
pub const Thai: Self
pub const Tibetan: Self
pub const Tibt: Self = Self::Tibetan
pub const CanadianAboriginal: Self
pub const Cans: Self = Self::CanadianAboriginal
pub const Yi: Self
pub const Yiii: Self = Self::Yi
pub const Tagalog: Self
pub const Tglg: Self = Self::Tagalog
pub const Hanunoo: Self
pub const Hano: Self = Self::Hanunoo
pub const Buhid: Self
pub const Buhd: Self = Self::Buhid
pub const Tagbanwa: Self
pub const Tagb: Self = Self::Tagbanwa
pub const Braille: Self
pub const Brai: Self = Self::Braille
pub const Cypriot: Self
pub const Cprt: Self = Self::Cypriot
pub const Limbu: Self
pub const Limb: Self = Self::Limbu
pub const LinearB: Self
pub const Linb: Self = Self::LinearB
pub const Osmanya: Self
pub const Osma: Self = Self::Osmanya
pub const Shavian: Self
pub const Shaw: Self = Self::Shavian
pub const TaiLe: Self
pub const Tale: Self = Self::TaiLe
pub const Ugaritic: Self
pub const Ugar: Self = Self::Ugaritic
pub const KatakanaOrHiragana: Self
pub const Hrkt: Self = Self::KatakanaOrHiragana
pub const Buginese: Self
pub const Bugi: Self = Self::Buginese
pub const Glagolitic: Self
pub const Glag: Self = Self::Glagolitic
pub const Kharoshthi: Self
pub const Khar: Self = Self::Kharoshthi
pub const SylotiNagri: Self
pub const Sylo: Self = Self::SylotiNagri
pub const NewTaiLue: Self
pub const Talu: Self = Self::NewTaiLue
pub const Tifinagh: Self
pub const Tfng: Self = Self::Tifinagh
pub const OldPersian: Self
pub const Xpeo: Self = Self::OldPersian
pub const Balinese: Self
pub const Bali: Self = Self::Balinese
pub const Batak: Self
pub const Batk: Self = Self::Batak
Sourcepub const BlisSymbols: Self
pub const BlisSymbols: Self
ISO 15924
pub const Brahmi: Self
pub const Brah: Self = Self::Brahmi
pub const Cham: Self
Sourcepub const OldChurchSlavonicCyrillic: Self
pub const OldChurchSlavonicCyrillic: Self
ISO 15924
Sourcepub const DemoticEgyptian: Self
pub const DemoticEgyptian: Self
ISO 15924
Sourcepub const HieraticEgyptian: Self
pub const HieraticEgyptian: Self
ISO 15924
pub const EgyptianHieroglyphs: Self
pub const Egyp: Self = Self::EgyptianHieroglyphs
Sourcepub const SimplifiedHan: Self
pub const SimplifiedHan: Self
ISO 15924
Sourcepub const TraditionalHan: Self
pub const TraditionalHan: Self
ISO 15924
pub const PahawhHmong: Self
pub const Hmng: Self = Self::PahawhHmong
pub const OldHungarian: Self
pub const Hung: Self = Self::OldHungarian
Sourcepub const HarappanIndus: Self
pub const HarappanIndus: Self
ISO 15924
pub const Javanese: Self
pub const Java: Self = Self::Javanese
pub const KayahLi: Self
pub const Kali: Self = Self::KayahLi
Sourcepub const LatinFraktur: Self
pub const LatinFraktur: Self
ISO 15924
Sourcepub const LatinGaelic: Self
pub const LatinGaelic: Self
ISO 15924
pub const Lepcha: Self
pub const Lepc: Self = Self::Lepcha
pub const LinearA: Self
pub const Lina: Self = Self::LinearA
pub const Mandaic: Self
pub const Mand: Self = Self::Mandaic
Sourcepub const MayanHieroglyphs: Self
pub const MayanHieroglyphs: Self
ISO 15924
pub const MeroiticHieroglyphs: Self
pub const Mero: Self = Self::MeroiticHieroglyphs
pub const Nko: Self
pub const Nkoo: Self = Self::Nko
pub const OldTurkic: Self
pub const Orkh: Self = Self::OldTurkic
pub const OldPermic: Self
pub const Perm: Self = Self::OldPermic
pub const PhagsPa: Self
pub const Phag: Self = Self::PhagsPa
pub const Phoenician: Self
pub const Phnx: Self = Self::Phoenician
pub const Miao: Self
pub const Plrd: Self = Self::Miao
Sourcepub const Rongorongo: Self
pub const Rongorongo: Self
ISO 15924
Sourcepub const EstrangeloSyriac: Self
pub const EstrangeloSyriac: Self
ISO 15924
Sourcepub const WesternSyriac: Self
pub const WesternSyriac: Self
ISO 15924
Sourcepub const EasternSyriac: Self
pub const EasternSyriac: Self
ISO 15924
pub const Vai: Self
pub const Vaii: Self = Self::Vai
Sourcepub const VisibleSpeech: Self
pub const VisibleSpeech: Self
ISO 15924
pub const Cuneiform: Self
pub const Xsux: Self = Self::Cuneiform
Sourcepub const UnwrittenLanguages: Self
pub const UnwrittenLanguages: Self
ISO 15924
pub const Unknown: Self
pub const Zzzz: Self = Self::Unknown
pub const Carian: Self
pub const Cari: Self = Self::Carian
pub const TaiTham: Self
pub const Lana: Self = Self::TaiTham
pub const Lycian: Self
pub const Lyci: Self = Self::Lycian
pub const Lydian: Self
pub const Lydi: Self = Self::Lydian
pub const OlChiki: Self
pub const Olck: Self = Self::OlChiki
pub const Rejang: Self
pub const Rjng: Self = Self::Rejang
pub const Saurashtra: Self
pub const Saur: Self = Self::Saurashtra
pub const SignWriting: Self
pub const Sgnw: Self = Self::SignWriting
pub const Sundanese: Self
pub const Sund: Self = Self::Sundanese
pub const MeeteiMayek: Self
pub const Mtei: Self = Self::MeeteiMayek
pub const ImperialAramaic: Self
pub const Armi: Self = Self::ImperialAramaic
pub const Avestan: Self
pub const Avst: Self = Self::Avestan
pub const Chakma: Self
pub const Cakm: Self = Self::Chakma
pub const Kaithi: Self
pub const Kthi: Self = Self::Kaithi
pub const Manichaean: Self
pub const Mani: Self = Self::Manichaean
pub const InscriptionalPahlavi: Self
pub const Phli: Self = Self::InscriptionalPahlavi
pub const PsalterPahlavi: Self
pub const Phlp: Self = Self::PsalterPahlavi
Sourcepub const BookPahlavi: Self
pub const BookPahlavi: Self
ISO 15924
pub const InscriptionalParthian: Self
pub const Prti: Self = Self::InscriptionalParthian
pub const Samaritan: Self
pub const Samr: Self = Self::Samaritan
pub const TaiViet: Self
pub const Tavt: Self = Self::TaiViet
Sourcepub const MathematicalNotation: Self
pub const MathematicalNotation: Self
ISO 15924
pub const Bamum: Self
pub const Bamu: Self = Self::Bamum
pub const Lisu: Self
pub const OldSouthArabian: Self
pub const Sarb: Self = Self::OldSouthArabian
pub const BassaVah: Self
pub const Bass: Self = Self::BassaVah
pub const Duployan: Self
pub const Dupl: Self = Self::Duployan
pub const Elbasan: Self
pub const Elba: Self = Self::Elbasan
pub const Grantha: Self
pub const Gran: Self = Self::Grantha
pub const MendeKikakui: Self
pub const Mend: Self = Self::MendeKikakui
pub const MeroiticCursive: Self
pub const Merc: Self = Self::MeroiticCursive
pub const OldNorthArabian: Self
pub const Narb: Self = Self::OldNorthArabian
pub const Nabataean: Self
pub const Nbat: Self = Self::Nabataean
pub const Palmyrene: Self
pub const Palm: Self = Self::Palmyrene
pub const Khudawadi: Self
pub const Sind: Self = Self::Khudawadi
pub const WarangCiti: Self
pub const Wara: Self = Self::WarangCiti
pub const Mro: Self
pub const Mroo: Self = Self::Mro
pub const Nushu: Self
pub const Nshu: Self = Self::Nushu
pub const Sharada: Self
pub const Shrd: Self = Self::Sharada
pub const SoraSompeng: Self
pub const Sora: Self = Self::SoraSompeng
pub const Takri: Self
pub const Takr: Self = Self::Takri
pub const Tangut: Self
pub const Tang: Self = Self::Tangut
pub const AnatolianHieroglyphs: Self
pub const Hluw: Self = Self::AnatolianHieroglyphs
pub const Khojki: Self
pub const Khoj: Self = Self::Khojki
pub const Tirhuta: Self
pub const Tirh: Self = Self::Tirhuta
pub const CaucasianAlbanian: Self
pub const Aghb: Self = Self::CaucasianAlbanian
pub const Mahajani: Self
pub const Mahj: Self = Self::Mahajani
pub const Ahom: Self
pub const Hatran: Self
pub const Hatr: Self = Self::Hatran
pub const Modi: Self
pub const Multani: Self
pub const Mult: Self = Self::Multani
pub const PauCinHau: Self
pub const Pauc: Self = Self::PauCinHau
pub const Siddham: Self
pub const Sidd: Self = Self::Siddham
pub const Adlam: Self
pub const Adlm: Self = Self::Adlam
pub const Bhaiksuki: Self
pub const Bhks: Self = Self::Bhaiksuki
pub const Marchen: Self
pub const Marc: Self = Self::Marchen
pub const Newa: Self
pub const Osage: Self
pub const Osge: Self = Self::Osage
Sourcepub const HanWithBopomofo: Self
pub const HanWithBopomofo: Self
ISO 15924
Sourcepub const SymbolsEmoji: Self
pub const SymbolsEmoji: Self
ISO 15924
pub const MasaramGondi: Self
pub const Gonm: Self = Self::MasaramGondi
pub const Soyombo: Self
pub const Soyo: Self = Self::Soyombo
pub const ZanabazarSquare: Self
pub const Zanb: Self = Self::ZanabazarSquare
pub const Dogra: Self
pub const Dogr: Self = Self::Dogra
pub const GunjalaGondi: Self
pub const Gong: Self = Self::GunjalaGondi
pub const Makasar: Self
pub const Maka: Self = Self::Makasar
pub const Medefaidrin: Self
pub const Medf: Self = Self::Medefaidrin
pub const HanifiRohingya: Self
pub const Rohg: Self = Self::HanifiRohingya
pub const Sogdian: Self
pub const Sogd: Self = Self::Sogdian
pub const OldSogdian: Self
pub const Sogo: Self = Self::OldSogdian
pub const Elymaic: Self
pub const Elym: Self = Self::Elymaic
pub const NyiakengPuachueHmong: Self
pub const Hmnp: Self = Self::NyiakengPuachueHmong
pub const Nandinagari: Self
pub const Nand: Self = Self::Nandinagari
pub const Wancho: Self
pub const Wcho: Self = Self::Wancho
pub const Chorasmian: Self
pub const Chrs: Self = Self::Chorasmian
pub const DivesAkuru: Self
pub const Diak: Self = Self::DivesAkuru
pub const KhitanSmallScript: Self
pub const Kits: Self = Self::KhitanSmallScript
pub const Yezidi: Self
pub const Yezi: Self = Self::Yezidi
pub const CyproMinoan: Self
pub const Cpmn: Self = Self::CyproMinoan
pub const OldUyghur: Self
pub const Ougr: Self = Self::OldUyghur
pub const Tangsa: Self
pub const Tnsa: Self = Self::Tangsa
pub const Toto: Self
pub const Vithkuqi: Self
pub const Vith: Self = Self::Vithkuqi
pub const Kawi: Self
pub const NagMundari: Self
pub const Nagm: Self = Self::NagMundari
Sourcepub const ArabicNastaliq: Self
pub const ArabicNastaliq: Self
ISO 15924
pub const Garay: Self
pub const Gara: Self = Self::Garay
pub const GurungKhema: Self
pub const Gukh: Self = Self::GurungKhema
pub const KiratRai: Self
pub const Krai: Self = Self::KiratRai
pub const OlOnal: Self
pub const Onao: Self = Self::OlOnal
pub const Sunuwar: Self
pub const Sunu: Self = Self::Sunuwar
pub const Todhri: Self
pub const Todr: Self = Self::Todhri
pub const TuluTigalari: Self
pub const Tutg: Self = Self::TuluTigalari
pub const BeriaErfe: Self
pub const Berf: Self = Self::BeriaErfe
pub const Sidetic: Self
pub const Sidt: Self = Self::Sidetic
pub const TaiYo: Self
pub const Tayo: Self = Self::TaiYo
pub const TolongSiki: Self
pub const Tols: Self = Self::TolongSiki
Sourcepub const TraditionalHanWithLatin: Self
pub const TraditionalHanWithLatin: Self
ISO 15924
Source§impl Script
impl Script
Sourcepub const ALL_VALUES: &'static [Self]
👎Deprecated
pub const ALL_VALUES: &'static [Self]
Deprecated
Source§impl Script
impl Script
Sourcepub const Ethiopian: Self = Self::Ethiopic
👎Deprecated since 2.3.0: use Script::Ethiopic instead
pub const Ethiopian: Self = Self::Ethiopic
use Script::Ethiopic instead
Deprecated: non-canonical spelling
Sourcepub const Nastaliq: Self = Self::ArabicNastaliq
👎Deprecated since 2.3.0: use Script::ArabicNastaliq instead
pub const Nastaliq: Self = Self::ArabicNastaliq
use Script::ArabicNastaliq instead
Deprecated: non-canonical spelling
Sourcepub const fn to_icu4c_value(self) -> u16
👎Deprecated since 2.3.0: please comment on https://github.com/unicode-org/icu4x/issues/6067 if you need this
pub const fn to_icu4c_value(self) -> u16
please comment on https://github.com/unicode-org/icu4x/issues/6067 if you need this
Returns an ICU4C UScriptCode value.
Sourcepub const fn from_icu4c_value(value: u16) -> Self
👎Deprecated since 2.3.0: please comment on https://github.com/unicode-org/icu4x/issues/6067 if you need this
pub const fn from_icu4c_value(value: u16) -> Self
please comment on https://github.com/unicode-org/icu4x/issues/6067 if you need this
Constructor from an ICU4C UScriptCode value.
Trait Implementations§
impl Copy for Script
Source§impl EnumeratedProperty for Script
impl EnumeratedProperty for Script
impl Eq for Script
Source§impl From<Script> for Script
Available on crate feature compiled_data only.✨ Enabled with the compiled_data Cargo feature.
impl From<Script> for Script
compiled_data only.✨ Enabled with the compiled_data Cargo feature.
Source§impl From<Script> for Script
Available on crate feature compiled_data only.✨ Enabled with the compiled_data Cargo feature.
impl From<Script> for Script
compiled_data only.✨ Enabled with the compiled_data Cargo feature.
Source§impl NamedEnumeratedProperty for Script
impl NamedEnumeratedProperty for Script
Source§fn try_from_str(s: &str) -> Option<Self>
fn try_from_str(s: &str) -> Option<Self>
PropertyParser::new().get_loose(s) Read moreSource§fn long_name(&self) -> &'static str
fn long_name(&self) -> &'static str
PropertyNamesLong::new().get(*self).unwrap() Read moreSource§fn short_name(&self) -> &'static str
fn short_name(&self) -> &'static str
PropertyNamesShort::new().get(*self).unwrap() Read moreSource§impl Ord for Script
impl Ord for Script
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
impl ParseableEnumeratedProperty for Script
Source§impl PartialOrd for Script
impl PartialOrd for Script
impl StructuralPartialEq for Script
Source§impl TrieValue for Script
impl TrieValue for Script
Source§type TryFromU32Error = TryFromIntError
type TryFromU32Error = TryFromIntError
Source§fn try_from_u32(i: u32) -> Result<Self, Self::TryFromU32Error>
fn try_from_u32(i: u32) -> Result<Self, Self::TryFromU32Error>
u32 first.