#[repr(u8)]
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
#[allow(non_camel_case_types)] #[allow(missing_docs)] pub enum GeneralCategory {
Control = 0,
Format = 1,
Unassigned = 2,
PrivateUse = 3,
Surrogate = 4,
LowercaseLetter = 5,
ModifierLetter = 6,
OtherLetter = 7,
TitlecaseLetter = 8,
UppercaseLetter = 9,
SpacingMark = 10,
EnclosingMark = 11,
NonSpacingMark = 12,
DecimalNumber = 13,
LetterNumber = 14,
OtherNumber = 15,
ConnectPunctuation = 16,
DashPunctuation = 17,
ClosePunctuation = 18,
FinalPunctuation = 19,
InitialPunctuation = 20,
OtherPunctuation = 21,
OpenPunctuation = 22,
CurrencySymbol = 23,
ModifierSymbol = 24,
MathSymbol = 25,
OtherSymbol = 26,
LineSeparator = 27,
ParagraphSeparator = 28,
SpaceSeparator = 29,
}
pub trait GeneralCategoryFunc {
fn general_category(&self, ch: char) -> GeneralCategory;
}
pub trait CombiningClassFunc {
fn combining_class(&self, ch: char) -> u8;
}
pub trait MirroringFunc {
fn mirroring(&self, ch: char) -> char;
}
pub trait ScriptFunc {
fn script(&self, ch: char) -> [u8; 4];
}
pub trait ComposeFunc {
fn compose(&self, a: char, b: char) -> Option<char>;
}
pub trait DecomposeFunc {
fn decompose(&self, ab: char) -> Option<(char, char)>;
}