pub use crate::names::{NamedEnumeratedProperty, ParseableEnumeratedProperty};
pub use crate::bidi::{BidiMirroringGlyph, BidiPairedBracketType};
pub use crate::code_point_map::EnumeratedProperty;
macro_rules! make_enumerated_property {
(
name: $name:literal;
short_name: $short_name:literal;
ident: $value_ty:path;
data_marker: $data_marker:ty;
singleton: $singleton:ident;
$(ule_ty: $ule_ty:ty;)?
) => {
impl crate::private::Sealed for $value_ty {}
impl EnumeratedProperty for $value_ty {
type DataMarker = $data_marker;
#[cfg(feature = "compiled_data")]
const SINGLETON: &'static crate::provider::PropertyCodePointMap<'static, Self> =
crate::provider::Baked::$singleton;
const NAME: &'static [u8] = $name.as_bytes();
const SHORT_NAME: &'static [u8] = $short_name.as_bytes();
}
$(
impl zerovec::ule::AsULE for $value_ty {
type ULE = $ule_ty;
fn to_unaligned(self) -> Self::ULE {
self.0.to_unaligned()
}
fn from_unaligned(unaligned: Self::ULE) -> Self {
Self(zerovec::ule::AsULE::from_unaligned(unaligned))
}
}
)?
};
}
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::exhaustive_structs)] #[repr(transparent)]
pub struct BidiClass(pub(crate) u8);
impl BidiClass {
#[deprecated(
since = "2.3.0",
note = "please comment on https://github.com/unicode-org/icu4x/issues/6067 if you need this"
)]
pub const fn to_icu4c_value(self) -> u8 {
self.0
}
#[deprecated(
since = "2.3.0",
note = "please comment on https://github.com/unicode-org/icu4x/issues/6067 if you need this"
)]
pub const fn from_icu4c_value(value: u8) -> Self {
Self(value)
}
}
impl Default for BidiClass {
fn default() -> Self {
Self::LeftToRight
}
}
make_enumerated_property! {
name: "Bidi_Class";
short_name: "bc";
ident: BidiClass;
data_marker: crate::provider::PropertyEnumBidiClassV1;
singleton: SINGLETON_PROPERTY_ENUM_BIDI_CLASS_V1;
ule_ty: u8;
}
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::exhaustive_structs)] #[repr(transparent)]
pub struct NumericType(pub(crate) u8);
impl NumericType {
#[deprecated(
since = "2.3.0",
note = "please comment on https://github.com/unicode-org/icu4x/issues/6067 if you need this"
)]
pub const fn to_icu4c_value(self) -> u8 {
self.0
}
#[deprecated(
since = "2.3.0",
note = "please comment on https://github.com/unicode-org/icu4x/issues/6067 if you need this"
)]
pub const fn from_icu4c_value(value: u8) -> Self {
Self(value)
}
}
impl Default for NumericType {
fn default() -> Self {
Self::None
}
}
make_enumerated_property! {
name: "Numeric_Type";
short_name: "nt";
ident: NumericType;
data_marker: crate::provider::PropertyEnumNumericTypeV1;
singleton: SINGLETON_PROPERTY_ENUM_NUMERIC_TYPE_V1;
ule_ty: u8;
}
pub use crate::enum_values::GeneralCategory;
#[allow(clippy::derivable_impls)] impl Default for GeneralCategory {
fn default() -> Self {
Self::Unassigned
}
}
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash, Default)]
#[non_exhaustive]
pub struct GeneralCategoryOutOfBoundsError;
impl TryFrom<u8> for GeneralCategory {
type Error = GeneralCategoryOutOfBoundsError;
fn try_from(val: u8) -> Result<Self, GeneralCategoryOutOfBoundsError> {
GeneralCategory::new_from_u8(val).ok_or(GeneralCategoryOutOfBoundsError)
}
}
make_enumerated_property! {
name: "General_Category";
short_name: "gc";
ident: GeneralCategory;
data_marker: crate::provider::PropertyEnumGeneralCategoryV1;
singleton: SINGLETON_PROPERTY_ENUM_GENERAL_CATEGORY_V1;
}
#[derive(Copy, Clone, PartialEq, Debug, Eq)]
#[allow(clippy::exhaustive_structs)] #[repr(transparent)]
pub struct GeneralCategoryGroup(pub(crate) u32);
impl crate::private::Sealed for GeneralCategoryGroup {}
use GeneralCategory as GC;
use GeneralCategoryGroup as GCG;
#[allow(non_upper_case_globals, missing_docs)]
impl GeneralCategoryGroup {
pub const UppercaseLetter: GeneralCategoryGroup = GCG(1 << (GC::UppercaseLetter as u32));
pub const Lu: GeneralCategoryGroup = Self::UppercaseLetter;
pub const Ll: Self = Self::LowercaseLetter;
pub const LowercaseLetter: GeneralCategoryGroup = GCG(1 << (GC::LowercaseLetter as u32));
pub const TitlecaseLetter: GeneralCategoryGroup = GCG(1 << (GC::TitlecaseLetter as u32));
pub const Lt: Self = Self::TitlecaseLetter;
pub const ModifierLetter: GeneralCategoryGroup = GCG(1 << (GC::ModifierLetter as u32));
pub const Lm: Self = Self::ModifierLetter;
pub const OtherLetter: GeneralCategoryGroup = GCG(1 << (GC::OtherLetter as u32));
pub const Lo: Self = Self::OtherLetter;
pub const CasedLetter: GeneralCategoryGroup = GCG((1 << (GC::UppercaseLetter as u32))
| (1 << (GC::LowercaseLetter as u32))
| (1 << (GC::TitlecaseLetter as u32)));
pub const LC: Self = Self::CasedLetter;
pub const Letter: GeneralCategoryGroup = GCG((1 << (GC::UppercaseLetter as u32))
| (1 << (GC::LowercaseLetter as u32))
| (1 << (GC::TitlecaseLetter as u32))
| (1 << (GC::ModifierLetter as u32))
| (1 << (GC::OtherLetter as u32)));
pub const L: Self = Self::Letter;
pub const NonspacingMark: GeneralCategoryGroup = GCG(1 << (GC::NonspacingMark as u32));
pub const Mn: Self = Self::NonspacingMark;
pub const EnclosingMark: GeneralCategoryGroup = GCG(1 << (GC::EnclosingMark as u32));
pub const Me: Self = Self::EnclosingMark;
pub const SpacingMark: GeneralCategoryGroup = GCG(1 << (GC::SpacingMark as u32));
pub const Mc: Self = Self::SpacingMark;
pub const Mark: GeneralCategoryGroup = GCG((1 << (GC::NonspacingMark as u32))
| (1 << (GC::EnclosingMark as u32))
| (1 << (GC::SpacingMark as u32)));
pub const M: Self = Self::Mark;
pub const DecimalNumber: GeneralCategoryGroup = GCG(1 << (GC::DecimalNumber as u32));
pub const Nd: Self = Self::DecimalNumber;
pub const LetterNumber: GeneralCategoryGroup = GCG(1 << (GC::LetterNumber as u32));
pub const Nl: Self = Self::LetterNumber;
pub const OtherNumber: GeneralCategoryGroup = GCG(1 << (GC::OtherNumber as u32));
pub const No: Self = Self::OtherNumber;
pub const Number: GeneralCategoryGroup = GCG((1 << (GC::DecimalNumber as u32))
| (1 << (GC::LetterNumber as u32))
| (1 << (GC::OtherNumber as u32)));
pub const N: Self = Self::Number;
pub const SpaceSeparator: GeneralCategoryGroup = GCG(1 << (GC::SpaceSeparator as u32));
pub const Zs: Self = Self::SpaceSeparator;
pub const LineSeparator: GeneralCategoryGroup = GCG(1 << (GC::LineSeparator as u32));
pub const Zl: Self = Self::LineSeparator;
pub const ParagraphSeparator: GeneralCategoryGroup = GCG(1 << (GC::ParagraphSeparator as u32));
pub const Zp: Self = Self::ParagraphSeparator;
pub const Separator: GeneralCategoryGroup = GCG((1 << (GC::SpaceSeparator as u32))
| (1 << (GC::LineSeparator as u32))
| (1 << (GC::ParagraphSeparator as u32)));
pub const Z: Self = Self::Separator;
pub const Control: GeneralCategoryGroup = GCG(1 << (GC::Control as u32));
pub const Cc: Self = Self::Control;
pub const Format: GeneralCategoryGroup = GCG(1 << (GC::Format as u32));
pub const Cf: Self = Self::Format;
pub const PrivateUse: GeneralCategoryGroup = GCG(1 << (GC::PrivateUse as u32));
pub const Co: Self = Self::PrivateUse;
pub const Surrogate: GeneralCategoryGroup = GCG(1 << (GC::Surrogate as u32));
pub const Cs: Self = Self::Surrogate;
pub const Unassigned: GeneralCategoryGroup = GCG(1 << (GC::Unassigned as u32));
pub const Cn: Self = Self::Unassigned;
pub const Other: GeneralCategoryGroup = GCG((1 << (GC::Control as u32))
| (1 << (GC::Format as u32))
| (1 << (GC::PrivateUse as u32))
| (1 << (GC::Surrogate as u32))
| (1 << (GC::Unassigned as u32)));
pub const C: Self = Self::Other;
pub const DashPunctuation: GeneralCategoryGroup = GCG(1 << (GC::DashPunctuation as u32));
pub const Pd: Self = Self::DashPunctuation;
pub const OpenPunctuation: GeneralCategoryGroup = GCG(1 << (GC::OpenPunctuation as u32));
pub const Ps: Self = Self::OpenPunctuation;
pub const ClosePunctuation: GeneralCategoryGroup = GCG(1 << (GC::ClosePunctuation as u32));
pub const Pe: Self = Self::ClosePunctuation;
pub const ConnectorPunctuation: GeneralCategoryGroup =
GCG(1 << (GC::ConnectorPunctuation as u32));
pub const Pc: Self = Self::ConnectorPunctuation;
pub const InitialPunctuation: GeneralCategoryGroup = GCG(1 << (GC::InitialPunctuation as u32));
pub const Pi: Self = Self::InitialPunctuation;
pub const FinalPunctuation: GeneralCategoryGroup = GCG(1 << (GC::FinalPunctuation as u32));
pub const Pf: Self = Self::FinalPunctuation;
pub const OtherPunctuation: GeneralCategoryGroup = GCG(1 << (GC::OtherPunctuation as u32));
pub const Po: Self = Self::OtherPunctuation;
pub const Punctuation: GeneralCategoryGroup = GCG((1 << (GC::DashPunctuation as u32))
| (1 << (GC::OpenPunctuation as u32))
| (1 << (GC::ClosePunctuation as u32))
| (1 << (GC::ConnectorPunctuation as u32))
| (1 << (GC::OtherPunctuation as u32))
| (1 << (GC::InitialPunctuation as u32))
| (1 << (GC::FinalPunctuation as u32)));
pub const P: Self = Self::Punctuation;
pub const MathSymbol: GeneralCategoryGroup = GCG(1 << (GC::MathSymbol as u32));
pub const Sm: Self = Self::MathSymbol;
pub const CurrencySymbol: GeneralCategoryGroup = GCG(1 << (GC::CurrencySymbol as u32));
pub const Sc: Self = Self::CurrencySymbol;
pub const ModifierSymbol: GeneralCategoryGroup = GCG(1 << (GC::ModifierSymbol as u32));
pub const Sk: Self = Self::ModifierSymbol;
pub const OtherSymbol: GeneralCategoryGroup = GCG(1 << (GC::OtherSymbol as u32));
pub const So: Self = Self::OtherSymbol;
pub const Symbol: GeneralCategoryGroup = GCG((1 << (GC::MathSymbol as u32))
| (1 << (GC::CurrencySymbol as u32))
| (1 << (GC::ModifierSymbol as u32))
| (1 << (GC::OtherSymbol as u32)));
pub const S: Self = Self::Symbol;
const ALL: u32 = (1 << (GC::FinalPunctuation as u32 + 1)) - 1;
#[cfg(feature = "datagen")]
#[doc(hidden)]
pub fn names() -> impl Iterator<Item = (&'static str, Self)> {
[
("Lu", Self::UppercaseLetter),
("Ll", Self::LowercaseLetter),
("Lt", Self::TitlecaseLetter),
("Lm", Self::ModifierLetter),
("Lo", Self::OtherLetter),
("LC", Self::CasedLetter),
("L", Self::Letter),
("Mn", Self::NonspacingMark),
("Me", Self::EnclosingMark),
("Mc", Self::SpacingMark),
("M", Self::Mark),
("Nd", Self::DecimalNumber),
("Nl", Self::LetterNumber),
("No", Self::OtherNumber),
("N", Self::Number),
("Zs", Self::SpaceSeparator),
("Zl", Self::LineSeparator),
("Zp", Self::ParagraphSeparator),
("Z", Self::Separator),
("Cc", Self::Control),
("Cf", Self::Format),
("Co", Self::PrivateUse),
("Cs", Self::Surrogate),
("Cn", Self::Unassigned),
("C", Self::Other),
("Pd", Self::DashPunctuation),
("Ps", Self::OpenPunctuation),
("Pe", Self::ClosePunctuation),
("Pc", Self::ConnectorPunctuation),
("Pi", Self::InitialPunctuation),
("Pf", Self::FinalPunctuation),
("Po", Self::OtherPunctuation),
("P", Self::Punctuation),
("Sm", Self::MathSymbol),
("Sc", Self::CurrencySymbol),
("Sk", Self::ModifierSymbol),
("So", Self::OtherSymbol),
("S", Self::Symbol),
]
.into_iter()
}
pub const fn contains(self, val: GeneralCategory) -> bool {
0 != (1 << (val as u32)) & self.0
}
pub const fn complement(self) -> Self {
GeneralCategoryGroup(!self.0 & Self::ALL)
}
pub const fn all() -> Self {
Self(Self::ALL)
}
pub const fn empty() -> Self {
Self(0)
}
pub const fn union(self, other: Self) -> Self {
Self(self.0 | other.0)
}
pub const fn intersection(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl From<GeneralCategory> for GeneralCategoryGroup {
fn from(subcategory: GeneralCategory) -> Self {
GeneralCategoryGroup(1 << (subcategory as u32))
}
}
impl From<u32> for GeneralCategoryGroup {
fn from(mask: u32) -> Self {
GeneralCategoryGroup(mask & Self::ALL)
}
}
impl From<GeneralCategoryGroup> for u32 {
fn from(group: GeneralCategoryGroup) -> Self {
group.0
}
}
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::exhaustive_structs)] #[repr(transparent)]
pub struct Script(pub(crate) u16);
impl Script {
#[deprecated(
since = "2.3.0",
note = "please comment on https://github.com/unicode-org/icu4x/issues/6067 if you need this"
)]
pub const fn to_icu4c_value(self) -> u16 {
self.0
}
#[deprecated(
since = "2.3.0",
note = "please comment on https://github.com/unicode-org/icu4x/issues/6067 if you need this"
)]
pub const fn from_icu4c_value(value: u16) -> Self {
Self(value)
}
#[deprecated(since = "2.3.0", note = "use Script::Ethiopic instead")]
#[allow(non_upper_case_globals)]
pub const Ethiopian: Self = Self::Ethiopic;
#[deprecated(since = "2.3.0", note = "use Script::ArabicNastaliq instead")]
#[allow(non_upper_case_globals)]
pub const Nastaliq: Self = Self::ArabicNastaliq;
}
impl Default for Script {
fn default() -> Self {
Self::Unknown
}
}
impl Script {
#[doc(hidden)]
#[allow(non_upper_case_globals)]
#[deprecated]
pub const Chisoi: Script = Self(60_000);
}
#[cfg(feature = "compiled_data")]
impl From<Script> for icu_locale_core::subtags::Script {
fn from(value: Script) -> Self {
crate::PropertyNamesShort::new()
.get_locale_script(value)
.unwrap_or(icu_locale_core::subtags::script!("Zzzz"))
}
}
#[cfg(feature = "compiled_data")]
impl From<icu_locale_core::subtags::Script> for Script {
fn from(value: icu_locale_core::subtags::Script) -> Self {
crate::PropertyParser::new()
.get_strict(value.as_str())
.unwrap_or(Self::Unknown)
}
}
make_enumerated_property! {
name: "Script";
short_name: "sc";
ident: Script;
data_marker: crate::provider::PropertyEnumScriptV1;
singleton: SINGLETON_PROPERTY_ENUM_SCRIPT_V1;
ule_ty: <u16 as zerovec::ule::AsULE>::ULE;
}
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::exhaustive_structs)] #[repr(transparent)]
pub struct HangulSyllableType(pub(crate) u8);
impl HangulSyllableType {
#[deprecated(
since = "2.3.0",
note = "please comment on https://github.com/unicode-org/icu4x/issues/6067 if you need this"
)]
pub const fn to_icu4c_value(self) -> u8 {
self.0
}
#[deprecated(
since = "2.3.0",
note = "please comment on https://github.com/unicode-org/icu4x/issues/6067 if you need this"
)]
pub const fn from_icu4c_value(value: u8) -> Self {
Self(value)
}
#[deprecated(since = "2.3.0", note = "use HangulSyllableType::LVSyllable instead")]
#[allow(non_upper_case_globals)]
pub const LeadingVowelSyllable: Self = Self::LVSyllable;
#[deprecated(since = "2.3.0", note = "use HangulSyllableType::LVTSyllable instead")]
#[allow(non_upper_case_globals)]
pub const LeadingVowelTrailingSyllable: Self = Self::LVTSyllable;
}
impl Default for HangulSyllableType {
fn default() -> Self {
Self::NotApplicable
}
}
make_enumerated_property! {
name: "Hangul_Syllable_Type";
short_name: "hst";
ident: HangulSyllableType;
data_marker: crate::provider::PropertyEnumHangulSyllableTypeV1;
singleton: SINGLETON_PROPERTY_ENUM_HANGUL_SYLLABLE_TYPE_V1;
ule_ty: u8;
}
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::exhaustive_structs)] #[repr(transparent)]
pub struct EastAsianWidth(pub(crate) u8);
impl EastAsianWidth {
#[deprecated(
since = "2.3.0",
note = "please comment on https://github.com/unicode-org/icu4x/issues/6067 if you need this"
)]
pub const fn to_icu4c_value(self) -> u8 {
self.0
}
#[deprecated(
since = "2.3.0",
note = "please comment on https://github.com/unicode-org/icu4x/issues/6067 if you need this"
)]
pub const fn from_icu4c_value(value: u8) -> Self {
Self(value)
}
}
impl Default for EastAsianWidth {
fn default() -> Self {
Self::Neutral
}
}
make_enumerated_property! {
name: "East_Asian_Width";
short_name: "ea";
ident: EastAsianWidth;
data_marker: crate::provider::PropertyEnumEastAsianWidthV1;
singleton: SINGLETON_PROPERTY_ENUM_EAST_ASIAN_WIDTH_V1;
ule_ty: u8;
}
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::exhaustive_structs)] #[repr(transparent)]
pub struct LineBreak(pub(crate) u8);
impl LineBreak {
#[deprecated(
since = "2.3.0",
note = "please comment on https://github.com/unicode-org/icu4x/issues/6067 if you need this"
)]
pub const fn to_icu4c_value(self) -> u8 {
self.0
}
#[deprecated(
since = "2.3.0",
note = "please comment on https://github.com/unicode-org/icu4x/issues/6067 if you need this"
)]
pub const fn from_icu4c_value(value: u8) -> Self {
Self(value)
}
}
impl Default for LineBreak {
fn default() -> Self {
Self::Unknown
}
}
make_enumerated_property! {
name: "Line_Break";
short_name: "lb";
ident: LineBreak;
data_marker: crate::provider::PropertyEnumLineBreakV1;
singleton: SINGLETON_PROPERTY_ENUM_LINE_BREAK_V1;
ule_ty: u8;
}
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::exhaustive_structs)] #[repr(transparent)]
pub struct GraphemeClusterBreak(pub(crate) u8);
impl GraphemeClusterBreak {
#[deprecated(
since = "2.3.0",
note = "please comment on https://github.com/unicode-org/icu4x/issues/6067 if you need this"
)]
pub const fn to_icu4c_value(self) -> u8 {
self.0
}
#[deprecated(
since = "2.3.0",
note = "please comment on https://github.com/unicode-org/icu4x/issues/6067 if you need this"
)]
pub const fn from_icu4c_value(value: u8) -> Self {
Self(value)
}
}
impl Default for GraphemeClusterBreak {
fn default() -> Self {
Self::Other
}
}
make_enumerated_property! {
name: "Grapheme_Cluster_Break";
short_name: "GCB";
ident: GraphemeClusterBreak;
data_marker: crate::provider::PropertyEnumGraphemeClusterBreakV1;
singleton: SINGLETON_PROPERTY_ENUM_GRAPHEME_CLUSTER_BREAK_V1;
ule_ty: u8;
}
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::exhaustive_structs)] #[repr(transparent)]
pub struct WordBreak(pub(crate) u8);
impl WordBreak {
#[deprecated(
since = "2.3.0",
note = "please comment on https://github.com/unicode-org/icu4x/issues/6067 if you need this"
)]
pub const fn to_icu4c_value(self) -> u8 {
self.0
}
#[deprecated(
since = "2.3.0",
note = "please comment on https://github.com/unicode-org/icu4x/issues/6067 if you need this"
)]
pub const fn from_icu4c_value(value: u8) -> Self {
Self(value)
}
}
impl Default for WordBreak {
fn default() -> Self {
Self::Other
}
}
make_enumerated_property! {
name: "Word_Break";
short_name: "WB";
ident: WordBreak;
data_marker: crate::provider::PropertyEnumWordBreakV1;
singleton: SINGLETON_PROPERTY_ENUM_WORD_BREAK_V1;
ule_ty: u8;
}
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::exhaustive_structs)] #[repr(transparent)]
pub struct SentenceBreak(pub(crate) u8);
impl SentenceBreak {
#[deprecated(
since = "2.3.0",
note = "please comment on https://github.com/unicode-org/icu4x/issues/6067 if you need this"
)]
pub const fn to_icu4c_value(self) -> u8 {
self.0
}
#[deprecated(
since = "2.3.0",
note = "please comment on https://github.com/unicode-org/icu4x/issues/6067 if you need this"
)]
pub const fn from_icu4c_value(value: u8) -> Self {
Self(value)
}
}
impl Default for SentenceBreak {
fn default() -> Self {
Self::Other
}
}
make_enumerated_property! {
name: "Sentence_Break";
short_name: "SB";
ident: SentenceBreak;
data_marker: crate::provider::PropertyEnumSentenceBreakV1;
singleton: SINGLETON_PROPERTY_ENUM_SENTENCE_BREAK_V1;
ule_ty: u8;
}
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::exhaustive_structs)] #[repr(transparent)]
pub struct CanonicalCombiningClass(pub u8);
impl CanonicalCombiningClass {
#[deprecated(
since = "2.3.0",
note = "please comment on https://github.com/unicode-org/icu4x/issues/6067 if you need this"
)]
pub const fn to_icu4c_value(self) -> u8 {
self.0
}
#[deprecated(
since = "2.3.0",
note = "please comment on https://github.com/unicode-org/icu4x/issues/6067 if you need this"
)]
pub const fn from_icu4c_value(value: u8) -> Self {
Self(value)
}
}
impl Default for CanonicalCombiningClass {
fn default() -> Self {
Self::NotReordered
}
}
make_enumerated_property! {
name: "Canonical_Combining_Class";
short_name: "ccc";
ident: CanonicalCombiningClass;
data_marker: crate::provider::PropertyEnumCanonicalCombiningClassV1;
singleton: SINGLETON_PROPERTY_ENUM_CANONICAL_COMBINING_CLASS_V1;
ule_ty: u8;
}
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::exhaustive_structs)] #[repr(transparent)]
pub struct IndicConjunctBreak(pub(crate) u8);
impl IndicConjunctBreak {
#[deprecated(
since = "2.3.0",
note = "please comment on https://github.com/unicode-org/icu4x/issues/6067 if you need this"
)]
pub const fn to_icu4c_value(self) -> u8 {
self.0
}
#[deprecated(
since = "2.3.0",
note = "please comment on https://github.com/unicode-org/icu4x/issues/6067 if you need this"
)]
pub const fn from_icu4c_value(value: u8) -> Self {
Self(value)
}
}
impl Default for IndicConjunctBreak {
fn default() -> Self {
Self::None
}
}
make_enumerated_property! {
name: "Indic_Conjunct_Break";
short_name: "InCB";
ident: IndicConjunctBreak;
data_marker: crate::provider::PropertyEnumIndicConjunctBreakV1;
singleton: SINGLETON_PROPERTY_ENUM_INDIC_CONJUNCT_BREAK_V1;
ule_ty: u8;
}
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::exhaustive_structs)] #[repr(transparent)]
pub struct IndicSyllabicCategory(pub(crate) u8);
impl IndicSyllabicCategory {
#[deprecated(
since = "2.3.0",
note = "please comment on https://github.com/unicode-org/icu4x/issues/6067 if you need this"
)]
pub const fn to_icu4c_value(self) -> u8 {
self.0
}
#[deprecated(
since = "2.3.0",
note = "please comment on https://github.com/unicode-org/icu4x/issues/6067 if you need this"
)]
pub const fn from_icu4c_value(value: u8) -> Self {
Self(value)
}
}
impl Default for IndicSyllabicCategory {
fn default() -> Self {
Self::Other
}
}
make_enumerated_property! {
name: "Indic_Syllabic_Category";
short_name: "InSC";
ident: IndicSyllabicCategory;
data_marker: crate::provider::PropertyEnumIndicSyllabicCategoryV1;
singleton: SINGLETON_PROPERTY_ENUM_INDIC_SYLLABIC_CATEGORY_V1;
ule_ty: u8;
}
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::exhaustive_structs)] #[repr(transparent)]
pub struct JoiningGroup(pub(crate) u8);
impl JoiningGroup {
#[deprecated(
since = "2.3.0",
note = "please comment on https://github.com/unicode-org/icu4x/issues/6067 if you need this"
)]
pub const fn to_icu4c_value(self) -> u8 {
self.0
}
#[deprecated(
since = "2.3.0",
note = "please comment on https://github.com/unicode-org/icu4x/issues/6067 if you need this"
)]
pub const fn from_icu4c_value(value: u8) -> Self {
Self(value)
}
}
impl Default for JoiningGroup {
fn default() -> Self {
Self::NoJoiningGroup
}
}
make_enumerated_property! {
name: "Joining_Group";
short_name: "jg";
ident: JoiningGroup;
data_marker: crate::provider::PropertyEnumJoiningGroupV1;
singleton: SINGLETON_PROPERTY_ENUM_JOINING_GROUP_V1;
ule_ty: u8;
}
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::exhaustive_structs)] #[repr(transparent)]
pub struct JoiningType(pub(crate) u8);
impl JoiningType {
#[deprecated(
since = "2.3.0",
note = "please comment on https://github.com/unicode-org/icu4x/issues/6067 if you need this"
)]
pub const fn to_icu4c_value(self) -> u8 {
self.0
}
#[deprecated(
since = "2.3.0",
note = "please comment on https://github.com/unicode-org/icu4x/issues/6067 if you need this"
)]
pub const fn from_icu4c_value(value: u8) -> Self {
Self(value)
}
}
impl Default for JoiningType {
fn default() -> Self {
Self::NonJoining
}
}
make_enumerated_property! {
name: "Joining_Type";
short_name: "jt";
ident: JoiningType;
data_marker: crate::provider::PropertyEnumJoiningTypeV1;
singleton: SINGLETON_PROPERTY_ENUM_JOINING_TYPE_V1;
ule_ty: u8;
}
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::exhaustive_structs)] #[repr(transparent)]
pub struct VerticalOrientation(pub(crate) u8);
impl VerticalOrientation {
#[deprecated(
since = "2.3.0",
note = "please comment on https://github.com/unicode-org/icu4x/issues/6067 if you need this"
)]
pub const fn to_icu4c_value(self) -> u8 {
self.0
}
#[deprecated(
since = "2.3.0",
note = "please comment on https://github.com/unicode-org/icu4x/issues/6067 if you need this"
)]
pub const fn from_icu4c_value(value: u8) -> Self {
Self(value)
}
}
impl Default for VerticalOrientation {
fn default() -> Self {
Self::Rotated
}
}
make_enumerated_property! {
name: "Vertical_Orientation";
short_name: "vo";
ident: VerticalOrientation;
data_marker: crate::provider::PropertyEnumVerticalOrientationV1;
singleton: SINGLETON_PROPERTY_ENUM_VERTICAL_ORIENTATION_V1;
ule_ty: u8;
}
pub use crate::code_point_set::BinaryProperty;
macro_rules! make_binary_property {
(
name: $name:literal;
short_name: $short_name:literal;
ident: $ident:ident;
data_marker: $data_marker:ty;
singleton: $singleton:ident;
$(#[$doc:meta])+
) => {
$(#[$doc])+
#[derive(Debug)]
#[non_exhaustive]
pub struct $ident;
#[allow(deprecated)]
impl crate::private::Sealed for $ident {}
#[allow(deprecated)]
impl BinaryProperty for $ident {
type DataMarker = $data_marker;
#[cfg(feature = "compiled_data")]
const SINGLETON: &'static crate::provider::PropertyCodePointSet<'static> =
&crate::provider::Baked::$singleton;
const NAME: &'static [u8] = $name.as_bytes();
const SHORT_NAME: &'static [u8] = $short_name.as_bytes();
}
};
}
make_binary_property! {
name: "ASCII_Hex_Digit";
short_name: "AHex";
ident: AsciiHexDigit;
data_marker: crate::provider::PropertyBinaryAsciiHexDigitV1;
singleton: SINGLETON_PROPERTY_BINARY_ASCII_HEX_DIGIT_V1;
}
make_binary_property! {
name: "alnum";
short_name: "alnum";
ident: Alnum;
data_marker: crate::provider::PropertyBinaryAlnumV1;
singleton: SINGLETON_PROPERTY_BINARY_ALNUM_V1;
}
make_binary_property! {
name: "Alphabetic";
short_name: "Alpha";
ident: Alphabetic;
data_marker: crate::provider::PropertyBinaryAlphabeticV1;
singleton: SINGLETON_PROPERTY_BINARY_ALPHABETIC_V1;
}
make_binary_property! {
name: "Bidi_Control";
short_name: "Bidi_C";
ident: BidiControl;
data_marker: crate::provider::PropertyBinaryBidiControlV1;
singleton: SINGLETON_PROPERTY_BINARY_BIDI_CONTROL_V1;
}
make_binary_property! {
name: "Bidi_Mirrored";
short_name: "Bidi_M";
ident: BidiMirrored;
data_marker: crate::provider::PropertyBinaryBidiMirroredV1;
singleton: SINGLETON_PROPERTY_BINARY_BIDI_MIRRORED_V1;
}
make_binary_property! {
name: "blank";
short_name: "blank";
ident: Blank;
data_marker: crate::provider::PropertyBinaryBlankV1;
singleton: SINGLETON_PROPERTY_BINARY_BLANK_V1;
}
make_binary_property! {
name: "Cased";
short_name: "Cased";
ident: Cased;
data_marker: crate::provider::PropertyBinaryCasedV1;
singleton: SINGLETON_PROPERTY_BINARY_CASED_V1;
}
make_binary_property! {
name: "Case_Ignorable";
short_name: "CI";
ident: CaseIgnorable;
data_marker: crate::provider::PropertyBinaryCaseIgnorableV1;
singleton: SINGLETON_PROPERTY_BINARY_CASE_IGNORABLE_V1;
}
make_binary_property! {
name: "Full_Composition_Exclusion";
short_name: "Comp_Ex";
ident: FullCompositionExclusion;
data_marker: crate::provider::PropertyBinaryFullCompositionExclusionV1;
singleton: SINGLETON_PROPERTY_BINARY_FULL_COMPOSITION_EXCLUSION_V1;
}
make_binary_property! {
name: "Changes_When_Casefolded";
short_name: "CWCF";
ident: ChangesWhenCasefolded;
data_marker: crate::provider::PropertyBinaryChangesWhenCasefoldedV1;
singleton: SINGLETON_PROPERTY_BINARY_CHANGES_WHEN_CASEFOLDED_V1;
}
make_binary_property! {
name: "Changes_When_Casemapped";
short_name: "CWCM";
ident: ChangesWhenCasemapped;
data_marker: crate::provider::PropertyBinaryChangesWhenCasemappedV1;
singleton: SINGLETON_PROPERTY_BINARY_CHANGES_WHEN_CASEMAPPED_V1;
}
make_binary_property! {
name: "Changes_When_NFKC_Casefolded";
short_name: "CWKCF";
ident: ChangesWhenNfkcCasefolded;
data_marker: crate::provider::PropertyBinaryChangesWhenNfkcCasefoldedV1;
singleton: SINGLETON_PROPERTY_BINARY_CHANGES_WHEN_NFKC_CASEFOLDED_V1;
}
make_binary_property! {
name: "Changes_When_Lowercased";
short_name: "CWL";
ident: ChangesWhenLowercased;
data_marker: crate::provider::PropertyBinaryChangesWhenLowercasedV1;
singleton: SINGLETON_PROPERTY_BINARY_CHANGES_WHEN_LOWERCASED_V1;
}
make_binary_property! {
name: "Changes_When_Titlecased";
short_name: "CWT";
ident: ChangesWhenTitlecased;
data_marker: crate::provider::PropertyBinaryChangesWhenTitlecasedV1;
singleton: SINGLETON_PROPERTY_BINARY_CHANGES_WHEN_TITLECASED_V1;
}
make_binary_property! {
name: "Changes_When_Uppercased";
short_name: "CWU";
ident: ChangesWhenUppercased;
data_marker: crate::provider::PropertyBinaryChangesWhenUppercasedV1;
singleton: SINGLETON_PROPERTY_BINARY_CHANGES_WHEN_UPPERCASED_V1;
}
make_binary_property! {
name: "Dash";
short_name: "Dash";
ident: Dash;
data_marker: crate::provider::PropertyBinaryDashV1;
singleton: SINGLETON_PROPERTY_BINARY_DASH_V1;
}
make_binary_property! {
name: "Deprecated";
short_name: "Dep";
ident: Deprecated;
data_marker: crate::provider::PropertyBinaryDeprecatedV1;
singleton: SINGLETON_PROPERTY_BINARY_DEPRECATED_V1;
}
make_binary_property! {
name: "Default_Ignorable_Code_Point";
short_name: "DI";
ident: DefaultIgnorableCodePoint;
data_marker: crate::provider::PropertyBinaryDefaultIgnorableCodePointV1;
singleton: SINGLETON_PROPERTY_BINARY_DEFAULT_IGNORABLE_CODE_POINT_V1;
}
make_binary_property! {
name: "Diacritic";
short_name: "Dia";
ident: Diacritic;
data_marker: crate::provider::PropertyBinaryDiacriticV1;
singleton: SINGLETON_PROPERTY_BINARY_DIACRITIC_V1;
}
make_binary_property! {
name: "Emoji_Modifier_Base";
short_name: "EBase";
ident: EmojiModifierBase;
data_marker: crate::provider::PropertyBinaryEmojiModifierBaseV1;
singleton: SINGLETON_PROPERTY_BINARY_EMOJI_MODIFIER_BASE_V1;
}
make_binary_property! {
name: "Emoji_Component";
short_name: "EComp";
ident: EmojiComponent;
data_marker: crate::provider::PropertyBinaryEmojiComponentV1;
singleton: SINGLETON_PROPERTY_BINARY_EMOJI_COMPONENT_V1;
}
make_binary_property! {
name: "Emoji_Modifier";
short_name: "EMod";
ident: EmojiModifier;
data_marker: crate::provider::PropertyBinaryEmojiModifierV1;
singleton: SINGLETON_PROPERTY_BINARY_EMOJI_MODIFIER_V1;
}
make_binary_property! {
name: "Emoji";
short_name: "Emoji";
ident: Emoji;
data_marker: crate::provider::PropertyBinaryEmojiV1;
singleton: SINGLETON_PROPERTY_BINARY_EMOJI_V1;
}
make_binary_property! {
name: "Emoji_Presentation";
short_name: "EPres";
ident: EmojiPresentation;
data_marker: crate::provider::PropertyBinaryEmojiPresentationV1;
singleton: SINGLETON_PROPERTY_BINARY_EMOJI_PRESENTATION_V1;
}
make_binary_property! {
name: "Extender";
short_name: "Ext";
ident: Extender;
data_marker: crate::provider::PropertyBinaryExtenderV1;
singleton: SINGLETON_PROPERTY_BINARY_EXTENDER_V1;
}
make_binary_property! {
name: "Extended_Pictographic";
short_name: "ExtPict";
ident: ExtendedPictographic;
data_marker: crate::provider::PropertyBinaryExtendedPictographicV1;
singleton: SINGLETON_PROPERTY_BINARY_EXTENDED_PICTOGRAPHIC_V1;
}
make_binary_property! {
name: "graph";
short_name: "graph";
ident: Graph;
data_marker: crate::provider::PropertyBinaryGraphV1;
singleton: SINGLETON_PROPERTY_BINARY_GRAPH_V1;
}
make_binary_property! {
name: "Grapheme_Base";
short_name: "Gr_Base";
ident: GraphemeBase;
data_marker: crate::provider::PropertyBinaryGraphemeBaseV1;
singleton: SINGLETON_PROPERTY_BINARY_GRAPHEME_BASE_V1;
}
make_binary_property! {
name: "Grapheme_Extend";
short_name: "Gr_Ext";
ident: GraphemeExtend;
data_marker: crate::provider::PropertyBinaryGraphemeExtendV1;
singleton: SINGLETON_PROPERTY_BINARY_GRAPHEME_EXTEND_V1;
}
make_binary_property! {
name: "Grapheme_Link";
short_name: "Gr_Link";
ident: GraphemeLink;
data_marker: crate::provider::PropertyBinaryGraphemeLinkV1;
singleton: SINGLETON_PROPERTY_BINARY_GRAPHEME_LINK_V1;
}
make_binary_property! {
name: "Hex_Digit";
short_name: "Hex";
ident: HexDigit;
data_marker: crate::provider::PropertyBinaryHexDigitV1;
singleton: SINGLETON_PROPERTY_BINARY_HEX_DIGIT_V1;
}
make_binary_property! {
name: "Hyphen";
short_name: "Hyphen";
ident: Hyphen;
data_marker: crate::provider::PropertyBinaryHyphenV1;
singleton: SINGLETON_PROPERTY_BINARY_HYPHEN_V1;
}
make_binary_property! {
name: "ID_Compat_Math_Continue";
short_name: "ID_Compat_Math_Continue";
ident: IdCompatMathContinue;
data_marker: crate::provider::PropertyBinaryIdCompatMathContinueV1;
singleton: SINGLETON_PROPERTY_BINARY_ID_COMPAT_MATH_CONTINUE_V1;
}
make_binary_property! {
name: "ID_Compat_Math_Start";
short_name: "ID_Compat_Math_Start";
ident: IdCompatMathStart;
data_marker: crate::provider::PropertyBinaryIdCompatMathStartV1;
singleton: SINGLETON_PROPERTY_BINARY_ID_COMPAT_MATH_START_V1;
}
make_binary_property! {
name: "ID_Continue";
short_name: "IDC";
ident: IdContinue;
data_marker: crate::provider::PropertyBinaryIdContinueV1;
singleton: SINGLETON_PROPERTY_BINARY_ID_CONTINUE_V1;
}
make_binary_property! {
name: "Ideographic";
short_name: "Ideo";
ident: Ideographic;
data_marker: crate::provider::PropertyBinaryIdeographicV1;
singleton: SINGLETON_PROPERTY_BINARY_IDEOGRAPHIC_V1;
}
make_binary_property! {
name: "ID_Start";
short_name: "IDS";
ident: IdStart;
data_marker: crate::provider::PropertyBinaryIdStartV1;
singleton: SINGLETON_PROPERTY_BINARY_ID_START_V1;
}
make_binary_property! {
name: "IDS_Binary_Operator";
short_name: "IDSB";
ident: IdsBinaryOperator;
data_marker: crate::provider::PropertyBinaryIdsBinaryOperatorV1;
singleton: SINGLETON_PROPERTY_BINARY_IDS_BINARY_OPERATOR_V1;
}
make_binary_property! {
name: "IDS_Trinary_Operator";
short_name: "IDST";
ident: IdsTrinaryOperator;
data_marker: crate::provider::PropertyBinaryIdsTrinaryOperatorV1;
singleton: SINGLETON_PROPERTY_BINARY_IDS_TRINARY_OPERATOR_V1;
}
make_binary_property! {
name: "IDS_Unary_Operator";
short_name: "IDSU";
ident: IdsUnaryOperator;
data_marker: crate::provider::PropertyBinaryIdsUnaryOperatorV1;
singleton: SINGLETON_PROPERTY_BINARY_IDS_UNARY_OPERATOR_V1;
}
make_binary_property! {
name: "Join_Control";
short_name: "Join_C";
ident: JoinControl;
data_marker: crate::provider::PropertyBinaryJoinControlV1;
singleton: SINGLETON_PROPERTY_BINARY_JOIN_CONTROL_V1;
}
make_binary_property! {
name: "Logical_Order_Exception";
short_name: "LOE";
ident: LogicalOrderException;
data_marker: crate::provider::PropertyBinaryLogicalOrderExceptionV1;
singleton: SINGLETON_PROPERTY_BINARY_LOGICAL_ORDER_EXCEPTION_V1;
}
make_binary_property! {
name: "Lowercase";
short_name: "Lower";
ident: Lowercase;
data_marker: crate::provider::PropertyBinaryLowercaseV1;
singleton: SINGLETON_PROPERTY_BINARY_LOWERCASE_V1;
}
make_binary_property! {
name: "Math";
short_name: "Math";
ident: Math;
data_marker: crate::provider::PropertyBinaryMathV1;
singleton: SINGLETON_PROPERTY_BINARY_MATH_V1;
}
make_binary_property! {
name: "Modifier_Combining_Mark";
short_name: "MCM";
ident: ModifierCombiningMark;
data_marker: crate::provider::PropertyBinaryModifierCombiningMarkV1;
singleton: SINGLETON_PROPERTY_BINARY_MODIFIER_COMBINING_MARK_V1;
}
make_binary_property! {
name: "Noncharacter_Code_Point";
short_name: "NChar";
ident: NoncharacterCodePoint;
data_marker: crate::provider::PropertyBinaryNoncharacterCodePointV1;
singleton: SINGLETON_PROPERTY_BINARY_NONCHARACTER_CODE_POINT_V1;
}
make_binary_property! {
name: "NFC_Inert";
short_name: "nfcinert";
ident: NfcInert;
data_marker: crate::provider::PropertyBinaryNfcInertV1;
singleton: SINGLETON_PROPERTY_BINARY_NFC_INERT_V1;
#[deprecated(since = "2.3.0", note = "not a UCD property")]
}
make_binary_property! {
name: "NFD_Inert";
short_name: "nfdinert";
ident: NfdInert;
data_marker: crate::provider::PropertyBinaryNfdInertV1;
singleton: SINGLETON_PROPERTY_BINARY_NFD_INERT_V1;
#[deprecated(since = "2.3.0", note = "not a UCD property")]
}
make_binary_property! {
name: "NFKC_Inert";
short_name: "nfkcinert";
ident: NfkcInert;
data_marker: crate::provider::PropertyBinaryNfkcInertV1;
singleton: SINGLETON_PROPERTY_BINARY_NFKC_INERT_V1;
#[deprecated(since = "2.3.0", note = "not a UCD property")]
}
make_binary_property! {
name: "NFKD_Inert";
short_name: "nfkdinert";
ident: NfkdInert;
data_marker: crate::provider::PropertyBinaryNfkdInertV1;
singleton: SINGLETON_PROPERTY_BINARY_NFKD_INERT_V1;
#[deprecated(since = "2.3.0", note = "not a UCD property")]
}
make_binary_property! {
name: "Pattern_Syntax";
short_name: "Pat_Syn";
ident: PatternSyntax;
data_marker: crate::provider::PropertyBinaryPatternSyntaxV1;
singleton: SINGLETON_PROPERTY_BINARY_PATTERN_SYNTAX_V1;
}
make_binary_property! {
name: "Pattern_White_Space";
short_name: "Pat_WS";
ident: PatternWhiteSpace;
data_marker: crate::provider::PropertyBinaryPatternWhiteSpaceV1;
singleton: SINGLETON_PROPERTY_BINARY_PATTERN_WHITE_SPACE_V1;
}
make_binary_property! {
name: "Prepended_Concatenation_Mark";
short_name: "PCM";
ident: PrependedConcatenationMark;
data_marker: crate::provider::PropertyBinaryPrependedConcatenationMarkV1;
singleton: SINGLETON_PROPERTY_BINARY_PREPENDED_CONCATENATION_MARK_V1;
}
make_binary_property! {
name: "print";
short_name: "print";
ident: Print;
data_marker: crate::provider::PropertyBinaryPrintV1;
singleton: SINGLETON_PROPERTY_BINARY_PRINT_V1;
}
make_binary_property! {
name: "Quotation_Mark";
short_name: "QMark";
ident: QuotationMark;
data_marker: crate::provider::PropertyBinaryQuotationMarkV1;
singleton: SINGLETON_PROPERTY_BINARY_QUOTATION_MARK_V1;
}
make_binary_property! {
name: "Radical";
short_name: "Radical";
ident: Radical;
data_marker: crate::provider::PropertyBinaryRadicalV1;
singleton: SINGLETON_PROPERTY_BINARY_RADICAL_V1;
}
make_binary_property! {
name: "Regional_Indicator";
short_name: "RI";
ident: RegionalIndicator;
data_marker: crate::provider::PropertyBinaryRegionalIndicatorV1;
singleton: SINGLETON_PROPERTY_BINARY_REGIONAL_INDICATOR_V1;
}
make_binary_property! {
name: "Soft_Dotted";
short_name: "SD";
ident: SoftDotted;
data_marker: crate::provider::PropertyBinarySoftDottedV1;
singleton: SINGLETON_PROPERTY_BINARY_SOFT_DOTTED_V1;
}
make_binary_property! {
name: "Segment_Starter";
short_name: "segstart";
ident: SegmentStarter;
data_marker: crate::provider::PropertyBinarySegmentStarterV1;
singleton: SINGLETON_PROPERTY_BINARY_SEGMENT_STARTER_V1;
#[deprecated(since = "2.3.0", note = "not a UCD property")]
}
make_binary_property! {
name: "Case_Sensitive";
short_name: "Sensitive";
ident: CaseSensitive;
data_marker: crate::provider::PropertyBinaryCaseSensitiveV1;
singleton: SINGLETON_PROPERTY_BINARY_CASE_SENSITIVE_V1;
#[deprecated(since = "2.3.0", note = "not a UCD property")]
}
make_binary_property! {
name: "Sentence_Terminal";
short_name: "STerm";
ident: SentenceTerminal;
data_marker: crate::provider::PropertyBinarySentenceTerminalV1;
singleton: SINGLETON_PROPERTY_BINARY_SENTENCE_TERMINAL_V1;
}
make_binary_property! {
name: "Terminal_Punctuation";
short_name: "Term";
ident: TerminalPunctuation;
data_marker: crate::provider::PropertyBinaryTerminalPunctuationV1;
singleton: SINGLETON_PROPERTY_BINARY_TERMINAL_PUNCTUATION_V1;
}
make_binary_property! {
name: "Unified_Ideograph";
short_name: "UIdeo";
ident: UnifiedIdeograph;
data_marker: crate::provider::PropertyBinaryUnifiedIdeographV1;
singleton: SINGLETON_PROPERTY_BINARY_UNIFIED_IDEOGRAPH_V1;
}
make_binary_property! {
name: "Uppercase";
short_name: "Upper";
ident: Uppercase;
data_marker: crate::provider::PropertyBinaryUppercaseV1;
singleton: SINGLETON_PROPERTY_BINARY_UPPERCASE_V1;
}
make_binary_property! {
name: "Variation_Selector";
short_name: "VS";
ident: VariationSelector;
data_marker: crate::provider::PropertyBinaryVariationSelectorV1;
singleton: SINGLETON_PROPERTY_BINARY_VARIATION_SELECTOR_V1;
}
make_binary_property! {
name: "White_Space";
short_name: "WSpace";
ident: WhiteSpace;
data_marker: crate::provider::PropertyBinaryWhiteSpaceV1;
singleton: SINGLETON_PROPERTY_BINARY_WHITE_SPACE_V1;
}
make_binary_property! {
name: "xdigit";
short_name: "xdigit";
ident: Xdigit;
data_marker: crate::provider::PropertyBinaryXdigitV1;
singleton: SINGLETON_PROPERTY_BINARY_XDIGIT_V1;
}
make_binary_property! {
name: "XID_Continue";
short_name: "XIDC";
ident: XidContinue;
data_marker: crate::provider::PropertyBinaryXidContinueV1;
singleton: SINGLETON_PROPERTY_BINARY_XID_CONTINUE_V1;
}
make_binary_property! {
name: "XID_Start";
short_name: "XIDS";
ident: XidStart;
data_marker: crate::provider::PropertyBinaryXidStartV1;
singleton: SINGLETON_PROPERTY_BINARY_XID_START_V1;
}
pub use crate::emoji::EmojiSet;
macro_rules! make_emoji_set {
(
name: $name:literal;
short_name: $short_name:literal;
ident: $ident:ident;
data_marker: $data_marker:ty;
singleton: $singleton:ident;
$(#[$doc:meta])+
) => {
$(#[$doc])+
#[derive(Debug)]
#[non_exhaustive]
pub struct $ident;
impl crate::private::Sealed for $ident {}
impl EmojiSet for $ident {
type DataMarker = $data_marker;
#[cfg(feature = "compiled_data")]
const SINGLETON: &'static crate::provider::PropertyUnicodeSet<'static> =
&crate::provider::Baked::$singleton;
const NAME: &'static [u8] = $name.as_bytes();
const SHORT_NAME: &'static [u8] = $short_name.as_bytes();
}
}
}
make_emoji_set! {
name: "Basic_Emoji";
short_name: "Basic_Emoji";
ident: BasicEmoji;
data_marker: crate::provider::PropertyBinaryBasicEmojiV1;
singleton: SINGLETON_PROPERTY_BINARY_BASIC_EMOJI_V1;
}